binarylogic / searchlogic

Searchlogic provides object based searching, common named scopes, and other useful tools.
http://rdoc.info/projects/binarylogic/searchlogic
MIT License
1.4k stars 133 forks source link

Where do I define searchlogics scoped procedures? #127

Closed timfong888 closed 13 years ago

timfong888 commented 13 years ago

I see the example: [code] User.scope_procedure :awesome, lambda { name_begins_with("Ben").name_ends_with("Johnson") } [/code]

But where do I define this, can I put this in the User.rb? This syntax is different from define named procedures, for example.

ghost commented 13 years ago

In the same exact place you defined named_scopes

timfong888 commented 13 years ago

ah, gotcha, I figured it out -- it wasn't working because needed to hit reload! in the console....