you could do something like this in the application controller.
protected
def logged_in?
unless session[:user_id]
flash[:notice] = "You need to log in first."
redirect_to some_path
return false
else
return true
end
end
and then add a:
before_filter :logged_in?
to the controllers you want to protect.
PS: Nice screencast, congrats on 250th episode and +1 to a screencat on "account verification via email, password resetting, and a "remember me" option and others!"
Nice job with the new design!
Not to sound picky but, any plans to have mkv format as well?
@Piotr Kurek
you could do something like this in the application controller.
protected
def logged_in?
unless session[:user_id]
flash[:notice] = "You need to log in first."
redirect_to some_path
return false
else
return true
end
end
and then add a:
before_filter :logged_in?
to the controllers you want to protect.
PS: Nice screencast, congrats on 250th episode and +1 to a screencat on "account verification via email, password resetting, and a "remember me" option and others!"
thx a lot for this.
How about an "edit multiple records in one form, without checkboxes"?!
Using your products example.
thx!