# Can't save urls

**URL:** <https://www.ruby-forum.com/t/cant-save-urls/192116>\
**Category:** Rails\
**Created:** [July 24, 2010, 1:24am UTC](https://www.ruby-forum.com/t/cant-save-urls/192116 "2010-07-24T01:24:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [July 24, 2010, 1:24am UTC](https://www.ruby-forum.com/t/cant-save-urls/192116/1 "2010-07-24T01:24:40Z")

</div>

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/](http://tinyurl.com/)”

---

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [July 24, 2010, 10:59am UTC](https://www.ruby-forum.com/t/cant-save-urls/192116/2 "2010-07-24T10:59:23Z")

</div>

On Jul 24, 12:23 am, badnaam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

is there anything else in the model pertaining to website (perhaps  
you’ve overwritten one of the accessors by accident?)

Fred

---

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [July 24, 2010, 11:56am UTC](https://www.ruby-forum.com/t/cant-save-urls/192116/3 "2010-07-24T11:56:45Z")

</div>

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 C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
