I've found that would be pretty handy finding a method on an object :
1 - Use the Rails console
./server/console
2 - How to find a method by name :
Syntax.:
Object.new.methods.grep(/pattern/).sort
Example.:
User.new.methods.grep(/*[Uu]ser*/).sort
You also can compare two objects :
User.new.methods.grep(/*user*/).sort - Object.new.methods
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment