Module: SimpleCrudify::CrudifyDynamicResource Private
- Defined in:
- lib/simple_crudify/crudify_dynamic_resource.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create ⇒ Object private
- #destroy ⇒ Object private
- #update ⇒ Object private
Instance Method Details
#create ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 8 9 10 11 12 |
# File 'lib/simple_crudify/crudify_dynamic_resource.rb', line 5 def create @resource = model_klass.new(resource_params) @resource.save respond_to do |format| format.js { render layout: false } end end |
#destroy ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 |
# File 'lib/simple_crudify/crudify_dynamic_resource.rb', line 23 def destroy @resource = ResourceHelper.resource(model_klass, params[:id]) @resource.destroy respond_to do |format| format.js { render layout: false } end end |
#update ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 21 |
# File 'lib/simple_crudify/crudify_dynamic_resource.rb', line 14 def update @resource = ResourceHelper.resource(model_klass, params[:id]) @resource.update(resource_params) respond_to do |format| format.js { render layout: false } end end |