Displaying 2 results from an estimated 2 matches for "true_false".
2005 May 04
1
Conditional validations
...s.com/ticket/1196) and have come up with a
tentative solution that I''d like to bring up here.
What if we use a "conditional" parameter in the validates_* methods?
Here''s how it would look like in practice:
class Movie < ActiveRecord::Base
def allowed_to_validate=(true_false)
@allowed_to_validate = true_false
end
def allowed_to_validate
@allowed_to_validate
end
protected
validates_length_of :title, :within => 1..30, :if => :allowed_to_validate
end
This would solve the problem that Joe discovered (one-way encrypted
attributes can''t be...
2012 May 25
4
Hash Table - Select and Change Data iniside Matrix
Hi,
Here i have been a matrix like this,
*NAME AGE PALCE TRUE/FALSE*
ABC 20 INDIA
XYZ 30 FRANCE
PQR 40 USA
MNO 30 KENIYA
DEF 25 AUSTRALIA
Here,* TRUE/FALSE* Column containing empty values.
So my requirement what is , need to change all the *TRUE/FALSE *column value
into "*TRUE*" where *AGE =