On 5 April 2010 09:54, Tom Mac <li...@ruby-forum.com> wrote: > Hi > In my table I have > t.decimal :rent, :precision => 12, :scale => 2 > > But when ever I enter a large value like > 1234567890333.465 > > To the table it is stored as 9999999999.99 > > I would like to know how active record validation can be > applied here?
Have a look at the rails guide on validations at http://guides.rubyonrails.org. Particularly validates_numericality_of which allows a range of values to be specified. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.