Methods
Included Modules
Instance Public methods
create()
Link
after_action :verify_policy_scoped, only: %i[index show]
Source: show
# File rhino/rhino/app/controllers/rhino/active_model_extension_controller.rb 12 def create 13 @model = authorize klass.new(permit_and_transform(klass.new)) 14 klass.backing_store_create(@model) 15 16 permit_and_render 17 end
destroy()
Link
Source: show
# File rhino/rhino/app/controllers/rhino/active_model_extension_controller.rb 45 def destroy 46 @model = authorize klass.backing_store_show(params[:id]) 47 @model.backing_store_destroy 48 49 permit_and_render 50 end
index()
Link
Source: show
# File rhino/rhino/app/controllers/rhino/active_model_extension_controller.rb 19 def index 20 authorize klass 21 @models = klass.backing_store_index 22 23 # FIXME: - policy and sieve scopings 24 # @models = klass.sieves.resolve(policy_scope(klass), params) 25 render json: { 26 results: @models.map { |m| permit_model(m) }, 27 total: @models.count 28 } 29 end