lib/trestle/admin/builder.rb in trestle-0.9.8 vs lib/trestle/admin/builder.rb in trestle-0.10.0.pre
- old
+ new
@@ -86,9 +86,16 @@
else
@admin.breadcrumb = -> { false }
end
end
+ def remove_action(*actions)
+ actions.each do |action|
+ controller.remove_possible_method(action.to_sym)
+ @admin.actions.delete(action.to_sym)
+ end
+ end
+
protected
def normalize_table_options(name, options)
if name.is_a?(Hash)
# Default index table
name, options = :index, name