Methods
Included Modules
Instance Public methods
create()
Link
Source: show
# File rhino/rhino/app/controllers/rhino/crud_controller.rb 12 def create 13 @model = authorize klass.new(permit_and_transform(klass)) 14 @model.save! 15 16 permit_and_render 17 end
destroy()
Link
Source: show
# File rhino/rhino/app/controllers/rhino/crud_controller.rb 42 def destroy 43 @model = authorize find_resource 44 @model.destroy! 45 46 permit_and_render 47 end
index()
Link
Source: show
# File rhino/rhino/app/controllers/rhino/crud_controller.rb 19 def index 20 authorize klass 21 22 @models = klass.sieves.resolve(policy_scope(klass), params) 23 render json: { 24 results: @models.eager_load_refs.map { |m| permit_model(m) }, 25 total: @models.unscope(:limit, :offset).reselect(:id).count 26 } 27 end