Class: Cathode::UpdateAction

Inherits:
Action
  • Object
show all
Defined in:
lib/cathode/action.rb

Instance Attribute Summary

Attributes inherited from Action

#action_access_filter, #name, #resource

Instance Method Summary collapse

Methods inherited from Action

create, #initialize, #perform

Constructor Details

This class inherits a constructor from Cathode::Action

Instance Method Details

#perform_action(params) ⇒ Object



70
71
72
73
74
# File 'lib/cathode/action.rb', line 70

def perform_action(params)
  record = model.find(params[:id])
  record.update params
  record.reload
end