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

Version Path
e9_crm-0.1.34 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.33 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.32 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.31 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.30 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.29 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.28 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.27 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.26 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.25 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.24 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.23 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.22 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.21 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.20 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.19 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.18 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.17 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.16 app/controllers/e9_crm/users_controller.rb
e9_crm-0.1.14 app/controllers/e9_crm/users_controller.rb