search for: find_by_nickname

Displaying 4 results from an estimated 4 matches for "find_by_nickname".

2007 Nov 13
2
More Rails Pattern Examples?
Hi, I have been reading the documentation and examples on the rspec site. There are two "patterns" from Rails that I am not clear how to implement that are kind of related, and so I am not sure how to start. Does anyone have any examples of how to write rspecs for these? 1/ Nested resources. 2/ Resources that are specific to the current_user. In other words, I only want to
2007 Nov 25
4
is notify resevered word?
...SELECT * FROM `user_notifies` WHERE (user_notifies.user_id = 1) LIMIT 1 User::Notify Load (0.000781) SELECT * FROM `user_notifies` WHERE (user_notifies.user_id = 1) LIMIT 1 --------------------------------------------------------------- This is how I updated the column. >> user = User.find_by_nickname ''jamal'' => #<User id: 1, email: "jamal-fqskXWjLZVE@public.gmane.org", nickname: "Jamal", hashed_password: "e0195770807aa8c82b0b128d9c0423b5ad035172", logged_at: "2007-11-25 14:55:52", created_at: "2007-11-17 19:02:16", times_...
2007 Nov 21
6
How thorough do you test?
Testing models is great and would not be able to create anything without it, but I am finding testing the controllers and views is a pain. Rest based controllers don''t seem to change that much when compared to the auto-generated code that obviously works. As for views I fail to see why testing it with a mock model does anything. Nothing is ensuring that when changes are made to the
2006 Nov 02
4
Still Having Problems With :through When Going To Same Table... Help... please :-(
...foreign_key => "user_id" belongs_to :spankee, :class_name => "User", :foreign_key => "spanked_user_id" end db_table:spanks id | user_id | spanked_user_id | created_at | updated_at >>>>> I want to be able to make statemets like: john = User.find_by_nickname("john") john.spanked john.was_spanked_by Can I do this without using a :finder_sql? The above does not work... but the following does: john.spanks spank = Spank.find(1) spank.spankee spank.spanker Help... help... I get the following error: ActiveRecord::HasManyThroughSourceAssociatio...