Skip to content

Commit

Permalink
Change const_get to constantize to fix undefined method `default_scoped'
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua5201 committed Sep 22, 2017
1 parent 736266d commit 6d2a70a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/administrate/resource_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ def initialize(controller_path)
end

def dashboard_class
Object.const_get(resource_class_name + "Dashboard")
ActiveSupport::Inflector.constantize("#{resource_class_name}Dashboard")
end

def namespace
controller_path.split("/").first
end

def resource_class
Object.const_get(resource_class_name)
resource_class_name.constantize
end

def resource_name
Expand Down

0 comments on commit 6d2a70a

Please sign in to comment.