Methods
C
D
I
S
U
Included Modules
Instance Public methods
create()

after_action :verify_policy_scoped, only: %i[index 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()
   # 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()
   # 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
show()
   # File rhino/rhino/app/controllers/rhino/active_model_extension_controller.rb
31 def show
32   @model = authorize(klass.backing_store_show(params[:id]))
33 
34   permit_and_render
35 end
update()
   # File rhino/rhino/app/controllers/rhino/active_model_extension_controller.rb
37 def update
38   @model = authorize klass.new(permit_and_transform(klass.new))
39   # FIXME: Return updated model
40   @model.backing_store_update
41 
42   permit_and_render
43 end