class AccountsController < ApplicationController def new end def new_post @account = Account.new(params[:account]) if @account.save session[:account_id] = @account.id redirect_to :controller => 'shop', :action => 'index' else render :template => "accounts/new" end end def edit @account = current_account end end