Module: Roar::Rails::ControllerAdditions::Render

Defined in:
lib/roar/rails/controller_additions.rb

Overview

Include if you intend to use roar-rails with render json: model.

Instance Method Summary collapse

Instance Method Details

#render(options) ⇒ Object


81
82
83
84
85
# File 'lib/roar/rails/controller_additions.rb', line 81

def render(options)
  format = options.keys.first
  status = options[:status] || :ok
  super format => prepare_model_for(format, options.values.first, options), :status => status
end