mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 11:42:19 -05:00
26 lines
903 B
Ruby
26 lines
903 B
Ruby
ActiveAdmin.register Model do
|
|
actions :all, except: [:new]
|
|
Model.ransackable_symbols.each { |x| filter x }
|
|
|
|
# See permitted parameters documentation:
|
|
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
|
|
#
|
|
# Uncomment all parameters which should be permitted for assignment
|
|
#
|
|
# permit_params :name, :path, :library_id, :preview_file_id, :creator_id, :thingiverse_id, :cgtrader_path, :cults3d_path, :mmf_slug, :tag_list
|
|
#
|
|
# or
|
|
#
|
|
# permit_params do
|
|
# permitted = [:name, :path, :library_id, :preview_file_id, :creator_id, :thingiverse_id, :cgtrader_path, :cults3d_path, :mmf_slug, :tag_list]
|
|
# permitted << :other if params[:action] == 'create' && current_user.is_administrator?
|
|
# permitted
|
|
# end
|
|
|
|
controller do
|
|
def find_resource
|
|
scoped_collection.find_param(params[:id])
|
|
end
|
|
end
|
|
end
|