Sha256: 25470aca4bd8f1cb7e8d851a51843d7993fe30ee331086a7d1b0956649b48d21
Contents?: true
Size: 967 Bytes
Versions: 6
Compression:
Stored size: 967 Bytes
Contents
class DomainController < ApplicationController include DomainSystem layout 'scaffold' def login case @request.method when :post if @session[:domain] = Domain.authenticate(@params[:domain_name], @params[:domain_password]) flash['notice'] = "Login successful" redirect_back_or_default :action => "welcome" else flash.now['notice'] = "Login unsuccessful" @login = @params[:domain_login] end end end def signup @domain = Domain.new(@params[:domain]) if @request.post? and @domain.save @session[:domain] = Domain.authenticate(@domain.name, @params[:domain][:password]) flash['notice'] = "Signup successful" redirect_back_or_default :action => "welcome" end end def logout @session[:domain] = nil end def welcome end end
Version data entries
6 entries across 6 versions & 1 rubygems