form-for
form_tag not routing correctly
I am trying to get a form tag working in rails 3 but I keep getting a Routing Error: No route matches {:action=>\"search\", :controller=>\"posts\"}.[详细]
2023-04-11 00:21 分类:问答Rails: How to receive non-model form input, convert it to a model attribute, and then save that model
Background: I have a form_for mapped to a model called List. List has attributes: name, id, receiver_id, assigner_id.[详细]
2023-04-09 18:50 分类:问答Form_for generates resource path ending with '.1'
I have a resource called :school and when I call form_for(@school) it generates the form action: /school.1[详细]
2023-04-09 13:30 分类:问答set my state with collection_select with pluginaweek/state_machine
How do I create a collecton_select drop down to set the state of a resource in a form? right n开发者_如何转开发ow I have[详细]
2023-04-07 02:00 分类:问答How to set up form for a hash in Rails?
I have some data associated with a model that is in a hash. The hash is generated in the controller: @hash.[详细]
2023-04-06 16:11 分类:问答Rails 3.1 acts_as_tree, form and values to edit a menu on a single page
I\'m porting a php app to rails and am开发者_StackOverflow中文版 having trouble with a complex form. I have a acts_as_tree model called menu_headers and would like to create a form that is able to edi[详细]
2023-04-05 19:58 分类:问答Why won't my rails form_for with nested models won't remember form values?
I have a helper called user_order which returns an instance of Order. Order accepts nested attributes for User and Address. My (abbreviated) form looks like this:[详细]
2023-04-05 01:53 分类:问答Rails 3 form uses "edit" instead of "update" when the form is submitted
I have a problem with my form in Rails 3. The forms work if I create something, but if I try to update som开发者_如何学JAVAething, they fail. In this exmaple I tried to update the user settings, like[详细]
2023-04-04 18:34 分类:问答Using Has_and_belongs_to_many association in multi model view rails
I am new to rails and having trouble with views so excuse me if this is a simple question.I was wondering how add to a has_and_belongs_to_many association in the view.[详细]
2023-04-02 11:50 分类:问答How do I make it so that posts are "tagged" by checkboxes?
I\'m using acts-as-taggable-on. I\'ve tried multiple approaches but none of them work. On the view: <%= check_box(\"post\", \"add_politics\", {:class=> \"post\"}) %>[详细]
2023-04-01 08:55 分类:问答