search for: boolean_field

Displaying 3 results from an estimated 3 matches for "boolean_field".

2006 Aug 19
3
Activerecord validation problems
...; false t.column :read, :boolean, :null => false, :default => false t.column :write, :boolean, :null => false, :default => false t.column :admin, :boolean, :null => false, :default => false end In the mode I validate with the following : validates_presence_of :boolean_field The problem is that if I set the :boolean_field to false, the validation fails. I absolutely need to set the boolean field to ''true'' for the validation to pass. This isn''t normal, as true AND false are both valid values for a boolean field. Anyone else aware of thi...
2013 Nov 14
6
validates :boolean_field, presence: true misconceptions
Last night a friend of mine started ranting about validates_presence_of :boolean_field returning not valid when the boolean field is false. I checked the rails issues and this seems to be a pretty common concern about the naming of ''presence'' . Instead of changing the behaviour of the presence validator, I was wondering if maybe the answer to avoid such misconcep...
2006 Sep 18
1
Sorting Boolean fields
Hey there, I came across this thread: http://www.ruby-forum.com/topic/78148#126235 where sorting in reverse by a boolean field wasn''t working properly. I''m having the same issue now, but there''s not a reply in that thread. I was wondering if anyone has figured this out yet? Bascially, I want all the records with a "1" (true) to float to the top of the