Skip to content

Instantly share code, notes, and snippets.

@RemiBa
Created November 7, 2012 09:42
Show Gist options
  • Save RemiBa/4030431 to your computer and use it in GitHub Desktop.
Save RemiBa/4030431 to your computer and use it in GitHub Desktop.
Problems getting notices
<% flash.each do |name, message| %>
<%= content_tag :div, message, :id => "flash_#{name}" %>
<% end %>
def update
@customer = Customer.find_by_reset_token!(params[:id])
#redirect_to root_url, :notice => "Customer: #{@customer.to_s}"
end
<%= @customer.attributes.to_s %>
OUTPUT:
#<Customer:0x1c78ba8> (Which is filled in)
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
@RemiBa
Copy link
Author

RemiBa commented Nov 7, 2012

This isn't working mate.
I don't get why it isn't working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment