Method: Customs::Statuses#unprocessable
- Defined in:
- lib/customs/statuses.rb
#unprocessable(*args) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/customs/statuses.rb', line 26 def unprocessable *args = args. respond_to do |format| format.any * do action = .delete(:action) action ||= case params[:action] when 'update' then 'edit' when 'create' then 'new' else raise "Unknown unprocessable action" end render :status => 422, :action => action end format.all { render :status => 422 } end end |