Created
March 27, 2026 17:41
-
-
Save pablobm/185e9db2fe212ea27dc7e31c9911cf06 to your computer and use it in GitHub Desktop.
Remove `dashboard_context` (conversation at https://github.com/thoughtbot/administrate/pull/2457)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/administrate/field/has_many.rb b/lib/administrate/field/has_many.rb | |
| index 5197767c..70f91b30 100644 | |
| --- a/lib/administrate/field/has_many.rb | |
| +++ b/lib/administrate/field/has_many.rb | |
| @@ -28,7 +28,6 @@ module Administrate | |
| collection_attributes: options[:collection_attributes] | |
| ).tap do |page| | |
| page.context = context | |
| - page.dashboard_context = context | |
| end | |
| end | |
| diff --git a/lib/administrate/field/has_one.rb b/lib/administrate/field/has_one.rb | |
| index 1ef83f5a..491bc03f 100644 | |
| --- a/lib/administrate/field/has_one.rb | |
| +++ b/lib/administrate/field/has_one.rb | |
| @@ -28,7 +28,6 @@ module Administrate | |
| data || resolver.resource_class.new | |
| ).tap do |page| | |
| page.context = context | |
| - page.dashboard_context = context | |
| end | |
| end | |
| @@ -38,7 +37,6 @@ module Administrate | |
| data || resolver.resource_class.new | |
| ) do |page| | |
| page.context = context | |
| - page.dashboard_context = context | |
| end | |
| end | |
| diff --git a/lib/administrate/page/base.rb b/lib/administrate/page/base.rb | |
| index be7fbc1f..cbe8d21f 100644 | |
| --- a/lib/administrate/page/base.rb | |
| +++ b/lib/administrate/page/base.rb | |
| @@ -29,10 +29,6 @@ module Administrate | |
| attr_accessor :context | |
| - def dashboard_context=(context) | |
| - dashboard.context = context | |
| - end | |
| - | |
| private | |
| def attribute_field(dashboard, resource, attribute_name, page) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment