I have a model with a field called "website", its a varchar(150) mysql data type. the field renders fine in my new/edit forms, I have insured it does get to the update/create method in the controller in the params args, but it never gets saved! I have a validation on it that does not fire either, even if I enter more than 150 characters, which is the limit. Very strange because the same datatype, field name works just fine in another application. Any ideas? validates_length_of :website, :maximum => Constants::MAX_LINK_LENGTH, :allow_nil => true, :message => "Please keep the link within #{Constants::MAX_LINK_LENGTH} characters or make it short at http://tinyurl.com/" -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 24, 12:23 am, badnaam <asitkmis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a model with a field called "website", its a varchar(150) mysql > data type. > > the field renders fine in my new/edit forms, I have insured it does > get to the update/create method in the controller in the params args, > but it never gets saved! I have a validation on it that does not fire > either, even if I enter more than 150 characters, which is the limit. > > Very strange because the same datatype, field name works just fine in > another application. Any ideas? >is there anything else in the model pertaining to website (perhaps you''ve overwritten one of the accessors by accident?) Fred -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Did you list :website in attr_accessible? Check the server log and see if it''s being thrown out. On Jul 24, 4:58 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jul 24, 12:23 am, badnaam <asitkmis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a model with a field called "website", its a varchar(150) mysql > > data type. > > > the field renders fine in my new/edit forms, I have insured it does > > get to the update/create method in the controller in the params args, > > but it never gets saved! I have a validation on it that does not fire > > either, even if I enter more than 150 characters, which is the limit. > > > Very strange because the same datatype, field name works just fine in > > another application. Any ideas? > > is there anything else in the model pertaining to website (perhaps > you''ve overwritten one of the accessors by accident?) > > Fred-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.