Sha256: d7cc059dd2883572b7167cc6ef141b33ec5f250866dad196e069dfc7400ab9a1
Contents?: true
Size: 467 Bytes
Versions: 27
Compression:
Stored size: 467 Bytes
Contents
class AccountsController < ApplicationController layout 'application' def index @accounts = Account.find(:all) end def choose @account = Account.find(params[:id]) if @account session[:account_id] = @account.id flash[:notice] = "Selected account: #{@account.name}" end redirect_to '/' end def create Account.create!(params[:acct]) flash[:notice] = "Account created successfully" redirect_to '/' end end
Version data entries
27 entries across 16 versions & 2 rubygems