Notes posted by FooBarWidget
RSS feed![Default_avatar_30](https://www.gravatar.com/avatar/02f0ee0da223f90bb9996ef252e528c1?default=http://apidock.com/images/default_avatar_30.png&size=30)
3 thanks
:case_sensitive is on by default?
In contrast to what the documentation said, :case_sensitive seems to be on by default. This is the case with MySQL at least, I’m not sure about other databases.
![Default_avatar_30](https://www.gravatar.com/avatar/02f0ee0da223f90bb9996ef252e528c1?default=http://apidock.com/images/default_avatar_30.png&size=30)
5 thanks
Better explanation for ActionController sweepers
The first sentence in this description is confusing. http://codelevy.com/articles/2008/03/04/rails-caching-sweepers-controllers-and-models explains it more clearly.
![Default_avatar_30](https://www.gravatar.com/avatar/02f0ee0da223f90bb9996ef252e528c1?default=http://apidock.com/images/default_avatar_30.png&size=30)
4 thanks
collection.exists?(conditions)
The created association method also supports the ‘exists?’ method, similar to ActiveRecord::Base#exists?
has_and_belongs_to_many :categories ... categories.exist?(1) # Check whether there's a relation with a Category # object whose id is 1. categories.exist?(:id => 1) # ditto categories.exist?(['id', 1]) # ditto categories.exist?(:name => 'Anime')