Notes posted by Ramon
RSS feed
0 thanks
Now called class_attribute in Rails 3.2.x
See github.com/novafabrica/make_exportable/pull/4

0 thanks
Get the primary schema's name
If you’re using PostgreSQL and you’ve changed schema, sometimes you need to know what schema you’re in.
ActiveRecord::Base.connection.schema_search_path.split(",").first

0 thanks
Specify your own template
You can specify you own template this way:
def notice ... @template = "some_other_name.html.erb" end

0 thanks
sort_by
array.sort_by {|element| [element.foo, element.bar.name, element.baz]}
Taken from http://redcorundum.blogspot.com/2006/10/using-sortby-instead-of-sort.html

4 thanks

2 thanks
How to use with exclusive scope
Code example
Article.with_exclusive_scope { find(:all) } #=> "SELECT * FROM 'articles'
from http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping