2011-10-30 23:02:41 +00:00
|
|
|
module Locomotive
|
2010-05-10 22:39:52 +00:00
|
|
|
class AccountsController < BaseController
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
sections 'settings'
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
def new
|
|
|
|
@account = Account.new(:email => params[:email])
|
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
def create
|
2010-07-13 00:46:17 +00:00
|
|
|
@account = Account.create(params[:account])
|
|
|
|
current_site.memberships.create(:account => @account) if @account.errors.empty?
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-10-31 23:44:23 +00:00
|
|
|
respond_with @account, :location => edit_current_site_url
|
2010-07-13 00:46:17 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|