Sha256: dace2d5290576d766f4d8942206fb8baec483b792f4683166ce59a671a4c2910

Contents?: true

Size: 488 Bytes

Versions: 15

Compression:

Stored size: 488 Bytes

Contents

module Admin
  class AccountsController < BaseController
    
    sections 'settings'
    
    def new
      @account = Account.new(:email => params[:email])
    end
    
    def create
      @account = Account.new(params[:account])

      if @account.save
        current_site.memberships.create(:account => @account)
        flash_success!
        redirect_to edit_admin_current_site_url
      else
        flash_error!
        render :action => 'new'
      end
    end  
    
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotive_cms-0.0.2.9 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.8 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.7 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.6 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.5 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.4 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.3 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.2 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2.1 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.2 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.1.4 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.1.3 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.1.2 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.1.1 app/controllers/admin/accounts_controller.rb
locomotive_cms-0.0.1 app/controllers/admin/accounts_controller.rb