lib/avo/fields/has_base_field.rb in avo-3.0.0.pre19 vs lib/avo/fields/has_base_field.rb in avo-3.0.1.beta1
- old
+ new
@@ -77,11 +77,11 @@
false
end
# Adds the view override component
# has_one, has_many, has_and_belongs_to_many fields don't have edit views
- def component_for_view(view = Avo::ViewInquirer.new("index"))
- view = Avo::ViewInquirer.new("show") if view.in? %w[new create update edit]
+ def component_for_view(view = :index)
+ view = :show if view.in? [:new, :create, :update, :edit]
super view
end
def authorized?