@Gintautas Šimkus when i enter data my data is saving. What do u mean by
infrastructure in place to display the errors.

On Wed, Sep 12, 2012 at 5:18 PM, Gintautas Šimkus <dihita...@gmail.com>wrote:

> Is the record being saved? If not, then most likely you just do not have
> infrastructure in place to display the errors.
>
>
> 2012/9/12 honey ruby <emailtohoneyr...@gmail.com>
>
>> Hi all i am learning Rails3.2.7 but by ActiveRecords Validations are not
>> working.
>>
>> These are my User.rb
>>
>>  class User < ActiveRecord::Base
>>      attr_accessible :password, :fullname,:user_name
>> ,:email,:company_name#,:terms_of_service,:password_confirmation
>>
>>     validates :terms_of_service, :acceptance => { :accept => 'yes' }
>>       validates :password ,:confirmation => true
>>       validates :password_confirmation, :presence => true
>>       validates :fullname ,:presence => true
>>       validates :user_name ,:presence => true
>>       validates :email ,:presence => true
>>       validates :company_name ,:presence => true
>>
>>
>>
>> end
>>
>> but when i click Submit button with out entering the data my validations
>> are not working i'm not getting errors messages which is default in
>> rails.Can any one tell where did i go wrong
>>
>>
>> Thanks in advance
>>
>>  --
>> 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-talk@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/rubyonrails-talk/-/IC3GCiYi5GgJ.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> 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-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to