Posted By

winson on 04/30/07


Tagged

login textmate controller


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

webstic
octoberborn


My login


 / Published in: Rails
 

  1. def login
  2. @page_title = 'Publisher login'
  3. if request.post? && publisher = Publisher.check(params[:publisher][:name], params[:publisher][:password])
  4. flash[:notice] = "#{publisher.name} was successfully logged in!"
  5. redirect_to :action => 'index'
  6. else
  7. flash.now[:notice] = "Please login!"
  8. end
  9. end

Report this snippet  

You need to login to post a comment.