RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: leandromoreira
Site: http://leandromoreira.com.br
If you face the problem with mongoid problem:
MONGO MOP Can't canonicalize query: BadValue unknown operator: $oid
Make sure you change current_user method:
def current_user - @current_user ||= User.find(session[:user_id]) if session[:user_id] + @current_user ||= User.find(session[:user_id]["$oid"]) if session[:user_id] end
https://github.com/liziane/Cookbook/commit/128a9aeee392b8e680d86fdad35ac258846cedd6
I would like to know (links) how to keep user logged in info inside cookies safety.
If I would opt by using an external table (properties -> name, value); how it would looks like?
I think the models could be something like this.
has_many :proprieties #... end class Property belongs_to :product end
But, what are the best way to bind this to the view?
Perfect, I was using Simple Form then I had to use a different css path for that.
If you face the problem with mongoid problem:
MONGO MOP Can't canonicalize query: BadValue unknown operator: $oid
Make sure you change current_user method:
https://github.com/liziane/Cookbook/commit/128a9aeee392b8e680d86fdad35ac258846cedd6
I would like to know (links) how to keep user logged in info inside cookies safety.
If I would opt by using an external table (properties -> name, value); how it would looks like?
I think the models could be something like this.
But, what are the best way to bind this to the view?
Perfect, I was using Simple Form then I had to use a different css path for that.