-
-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rails 7.2 loading #1534
base: main
Are you sure you want to change the base?
Fix rails 7.2 loading #1534
Changes from 4 commits
1ad129a
a26e251
e9f20f5
4ece2c4
046bae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,12 @@ module ActionView::Helpers::Tags | |
# https://github.com/rails/rails/commit/c1a118a | ||
class Base | ||
private | ||
if defined? ::ActiveRecord | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that this was ever truly dependent on ActiveRecord. At one point, this was a version check. I agree with the comment that it would be nice to avoid this patch to ActionView, but I also think that the patch is necessary regardless of whether ActiveRecord is defined or not. Moreover, the code within doesn't depend on ActiveRecord as we are just calling |
||
def value | ||
if @allow_method_names_outside_object | ||
object.send @method_name if object && object.respond_to?(@method_name, true) | ||
else | ||
object.send @method_name if object | ||
end | ||
|
||
def value | ||
if @allow_method_names_outside_object | ||
object.send @method_name if object && object.respond_to?(@method_name, true) | ||
else | ||
object.send @method_name if object | ||
end | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
require 'machinist/active_record' | ||
require 'polyamorous/polyamorous' | ||
require 'ransack' | ||
require 'sham' | ||
require 'faker' | ||
require 'ransack' | ||
require 'action_controller' | ||
require 'ransack/helpers' | ||
require 'pry' | ||
require 'simplecov' | ||
require 'byebug' | ||
require 'machinist/active_record' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
SimpleCov.start | ||
I18n.enforce_available_locales = false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just requiring this explicitly since
on_load
does get used further down in this file (and I suppose should be considered in any other files that get required from here).