form-for
Saving radio buttons values in rails
I\'m trying to use radio buttons in my rails application.Currently the buttons are showing up on the page as expected, but the value is not being saved upon submission.I think the problem is actually[详细]
2023-03-29 10:46 分类:问答How to upgrade the :update=>'div_id' option of remote_form_for from Rails 2 to Rails 3?
I can\'t figure out how to upgrade this code from Rails 2 to Rails 3: <% remote_form_for(item, :update => \'div_id\') do |f| %>[详细]
2023-03-28 06:20 分类:问答form_for with multiple controller actions for submit
How do I pass a url on the form_for submit? I\'m trying to use one form with each buttons pointing to each controller actions, one is search and another one is create. Is it possible to have 2 submit[详细]
2023-03-27 16:20 分类:问答form_for - error accessing a controller variable in the view (rails 3)
I have a very simple model/view but for some reason I can\'t seem to access the new record variable and therefore get the error:[详细]
2023-03-27 07:11 分类:问答How can I update only a single field of a user profile in Rails 3?
I\'m adapting the authentication system from Rails 3 Tutorial by Michael Hartl to better learn about rails before (most likely) switching to a system like authlogic or devise. My authentication system[详细]
2023-03-26 12:24 分类:问答Mongoid embeds_many with Rails fields_for
I have a model like this: class Search include Mongoid::Document embeds_many :terms accepts_nested_attributes_for :terms[详细]
2023-03-24 23:51 分类:问答Grouping by attributes within a form_for
I am working on a Rails project that requires preferences for diferent user types depending on which shool. Thus i have these models:[详细]
2023-03-24 18:48 分类:问答How can I pass a variable from a each do to a form_for inside it
I have a <% @user.comments.each do |comment| %> and inside it is <%= form_for [????, Subcomment.new],:remote => true do |form| %>[详细]
2023-03-20 15:45 分类:问答Rails update action does not update boolean field
In my Rails app I have a nested form_for in my show action. This form is the same as the one in the edit action, but it has different fields.[详细]
2023-03-20 15:09 分类:问答Rails form_for loop with nested resources
I have three resources: Jobs, Questions and Answers. The relationships are: Job has many questions; Question has many Answers.[详细]
2023-03-19 23:56 分类:问答