Sha256: 7181e24cdf525414ecc4fe618853033fd44323b9d7bb96250bc0b1202faf85a6
Contents?: true
Size: 363 Bytes
Versions: 17
Compression:
Stored size: 363 Bytes
Contents
view :editor do |args| form.text_field :content, :class=>'card-content' end event :validate_number, :after=>:approve do errors.add :content, "'#{content}' is not numeric" unless valid_number?( content ) end def valid_number?( string ) valid = true begin Kernel.Float( string ) rescue ArgumentError, TypeError valid = false end valid end
Version data entries
17 entries across 17 versions & 1 rubygems