Created
November 7, 2012 09:42
-
-
Save RemiBa/4030431 to your computer and use it in GitHub Desktop.
Problems getting notices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% flash.each do |name, message| %> | |
<%= content_tag :div, message, :id => "flash_#{name}" %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update | |
@customer = Customer.find_by_reset_token!(params[:id]) | |
#redirect_to root_url, :notice => "Customer: #{@customer.to_s}" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= @customer.attributes.to_s %> | |
OUTPUT: | |
#<Customer:0x1c78ba8> (Which is filled in) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@customer ||= Customer.find(session[:customer_id]) if session[:customer_id] | |
unless session[:customer_id] | |
redirect_to login_path | |
return | |
end | |
unless @customer.authentication.login_count | |
redirect_to signup_path | |
return | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't working mate.
I don't get why it isn't working