Skip to content

Commit

Permalink
Force no error flash on session#new [#13 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfrench authored and Josh French committed Jan 1, 2011
1 parent 816291b commit 7601eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/sessions_controller.rb
Expand Up @@ -2,14 +2,15 @@ class SessionsController < ApplicationController
before_filter :get_event

def new
flash.now[:errors] = false
end

def create
if (@ride = Ride.find_by_auth(params[:id])) && @ride.email == params[:email]
self.current_ride = @ride
redirect_to ride_path(:event_id => @ride.event.slug, :id => @ride.auth)
else
flash.now[:errors] = true
flash.now[:errors] = true if request.post?
render :action => 'new'
end
end
Expand Down

0 comments on commit 7601eb2

Please sign in to comment.