We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

winson on 04/30/07


Tagged

login textmate controller


Versions (?)


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.