AppSignal issue #1222
$ bundle exec ruby before.rb
render_partial.action_view
render_template.action_view
instantiation.active_record
sql.active_record
search.elasticsearch
request.faraday
| # Credit Brandon Weiss of http://anti-pattern.com/dirty-associations-with-activerecord | |
| # app/models/dirty_associations.rb | |
| module DirtyAssociations | |
| attr_accessor :dirty | |
| attr_accessor :_record_changes | |
| def make_dirty(record) | |
| self.dirty = true | |
| self._record_changes = record |
$ bundle exec ruby before.rb
render_partial.action_view
render_template.action_view
instantiation.active_record
sql.active_record
search.elasticsearch
request.faraday
| # EditorConfig is awesome: https://EditorConfig.org | |
| # Top-most EditorConfig file | |
| root = true | |
| # All files | |
| [*] | |
| # Set the default charset to UTF-8 | |
| charset = utf-8 | |
| # Use spaces instead of tabs for indentation |
See my blog post at https://tobiasmaier.info:
UI testing plays a crucial role in ensuring that our applications work correctly and consistently. Traditionally, people either matched strings, referenced CSS classes or element IDs. But the landscape of UI testing is shifting, introducing a new and improved approach:
data-testid.This blog post explains how to use Test IDs with RSpec and Capybara, and introduces two new RSpec matchers (
have_test_idandhave_test_id_and_css) to simplify UI testing.
Source:
The Dry::Transacation documenatation speaks of an enqueue step adapter in its documentation.
However, I was unable to find a real world implementation.
This is why I came up with this in a PoC. I hope this is useful to someone.
| # frozen_string_literal: true | |
| class Form::ErrorMessageComponent < ViewComponent::Form::FieldComponent | |
| def call | |
| tag.p messages, class: 'mt-0.5 text-sm text-red-600' | |
| end | |
| def render? | |
| method_errors? | |
| end |
| # Related issue: https://github.com/CanCanCommunity/cancancan/issues/507 | |
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do |
| 0x9DA3Ff6fa502e51Cd934122Ed2f1dD961a46C876 |
See https://medium.com/it-me/deprecating-methods-in-ruby-e679c45ceeef#.etzmkdgn6 on "Deprecating methods in ruby"