Module: BoochTek::Rails::CrudActions::InstanceMethods
- Defined in:
- lib/rails-crud_actions.rb
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
56 57 58 |
# File 'lib/rails-crud_actions.rb', line 56 def create save_or_render 'new' end |
#delete ⇒ Object
53 54 |
# File 'lib/rails-crud_actions.rb', line 53 def delete end |
#destroy ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/rails-crud_actions.rb', line 64 def destroy @current_item.destroy respond_to do |format| format.html { redirect_to(self.send("#{current_model.table_name.singularize}_index_url")) } format.xml { head :ok } end end |
#edit ⇒ Object
50 51 |
# File 'lib/rails-crud_actions.rb', line 50 def edit end |
#index ⇒ Object
41 42 |
# File 'lib/rails-crud_actions.rb', line 41 def index end |
#new ⇒ Object
47 48 |
# File 'lib/rails-crud_actions.rb', line 47 def new end |
#show ⇒ Object
44 45 |
# File 'lib/rails-crud_actions.rb', line 44 def show end |
#update ⇒ Object
60 61 62 |
# File 'lib/rails-crud_actions.rb', line 60 def update save_or_render 'edit' end |