Hi guys, I''m creating my forms without the scaffold script, and now, I needed to add one more column in my table. But how can I update this? When I type something in this new text field, my database do not insert this new data. Thanks, Osiro --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello, I''m not totally clear what you mean. Once, you add a field to your table, you will also need to add a text field for it in your form_tag or form_for in your view. Can you post the code you''re using in your view with the form and also the code that performs the action. Jason Arora On Oct 10, 4:44 pm, Osiro <vinicius.os...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi guys, > > I''m creating my forms without the scaffold script, and now, I > needed to add one more column in my table. But how can I update this? > When I type something in this new text field, my database do not > insert this new data. > > Thanks, > Osiro--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
As I understand your question, you need to do migration of the column like this script/generate migration AddColumnToTable in the 0_0_x_add_column_to_table.rb file in db/migrate you need to add this column using add_column :table_name, :column_name, :type(string, int, etc) then you execute rake db:migrate do not forget to update your views so they match with the new change I wish I answered you On Oct 11, 7:44 am, Osiro <vinicius.os...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi guys, > > I''m creating my forms without the scaffold script, and now, I > needed to add one more column in my table. But how can I update this? > When I type something in this new text field, my database do not > insert this new data. > > Thanks, > Osiro--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---