Sha256: 2cf3870acaefe4bcb3c72dd07c4301896c23ff559e03732bb70ed61780486957
Contents?: true
Size: 429 Bytes
Versions: 20
Compression:
Stored size: 429 Bytes
Contents
class E9Crm::UsersController < ApplicationController inherit_resources respond_to :html, :except => :new respond_to :json, :only => :new def new new! do |format| format.json { render :json => resource } end end protected def build_resource get_resource_ivar || begin user = User.new(params[resource_instance_name] || {}) user.valid? set_resource_ivar(user) end end end
Version data entries
20 entries across 20 versions & 1 rubygems