lib/faalis/dashboard/sections/resource_show.rb in faalis-2.0.5 vs lib/faalis/dashboard/sections/resource_show.rb in faalis-2.0.7

- old
+ new

@@ -70,10 +70,12 @@ # end # end # ``` # def in_show(&block) - model = controller_name.classify.constantize + name = controller_name + path = controller_path.gsub(name, '').gsub(/dashboard\//, '') + model = "#{path}#{name}".classify.constantize show_props = Faalis::Dashboard::DSL::Show.new(model) unless block_given? fail ArgumentError, "You have to provide a block for 'in_show'" end