Web development blog

Tag: named_scope

Ultimate rspec matcher to test named_scope or scoped

Jul.11, 2010

After having a good practice on using Ultimate rspec matcher to test validation I think it’s time to implement one for testing named scopes - custom finders. Testing these finders is daily task. Here is how it can be done with minimum amount of code and maximum readability. (continue reading…)
1 Comment :, , , , more...

Advanced SQL and named scopes stack with ActiveRecord

Jan.24, 2010

If you ever work with rails application that is a little bit more complex then a simple CRUD you would know that some of the ActiveRecord magic doesn’t work for complex SQL queries. I am primary talking about named scopes stack feature.
(continue reading…)
1 Comment :, , , , , more...

The Content of this blog can be published anywhere with the link to original source.