Jump to content

The ultimate community for Ruby on Rails developers.


Photo

ActiveRecord migration question.


  • Please log in to reply
1 reply to this topic

#1 VDOGamer

VDOGamer

    Passenger

  • Members
  • 1 posts

Posted 02 April 2014 - 06:46 PM

Hello.  I've created a simple rails site, for testing purposes of adding a column in my MySQL database and updating its corresponding view page with a  form checkbox object.  When I run the migration and update the page, everything looks fine, but when I click on the checkbox, the value is not updated in the database. 

 

What am I doing wrong now?

 

Thanks,

 

Cameron.



#2 keither78

keither78

    Passenger

  • Members
  • 2 posts

Posted 02 April 2014 - 06:54 PM

Is the value type in the database boolean?

 

t.boolean 'said_value'

 

in the form

 

f.check_box :said_value






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users