class MyModel named_scope :not_hidden, :conditions => ['hidden IS NULL OR hidden = ?', false] end
Ruby On ActiveRecord: named_scope f...
by mislav,
June 19, 2008 19:46
class MyModel
named_scope :not_hidden, :conditions => { :hidden => false }
end
Ruby On ActiveRecord: named_scope f...
by mislav,
June 19, 2008 19:44
When NULL value is not allo...
class MyModel named_scope :not_hidden, :conditions => ['hidden IS NULL OR hidden = 0 OR hidden = ?', 'f'] end
Ruby ActiveRecord: named_scope f...
Can ActiveRecord be used to...
require 'erb' # GOAL: render the template with the following vars ...
Ruby Given a hash of variables, ...
by mislav,
April 12, 2008 15:12,
6 refactorings, tagged with hash, metaprogramming, erb, singleton, metaclass, render
This works. Now, is there a...
When you have to support NU...