similar to: Rails 2.3.2 nested forms, option_groups etc

Displaying 20 results from an estimated 60000 matches similar to: "Rails 2.3.2 nested forms, option_groups etc"

2009 Mar 16
2
nested forms in rails 2.3
Hi, Is there a simpler way to implement the view-component of nested forms as it was done in Railscast #75 (Complex Forms Part 3) in Rails 2.3? I''d like to add and remove the owned objects dynamically using AJAX requests, but using f.fields_for :object do |object_form| doen''t let me load new objects into the form - or at least I don''t fully understand how that should
2009 Apr 12
0
rails 2.3 nested forms with has_many through checkboxes
I was wondering if anyone knew of a way to combine the new nested forms in rails 2.3 with a has_many through relationship via checkboxes. Basically I have a page model, a page_category model and a category_items join table. Pages have many page categories through category items. The category_items table is polymorphic so i can use it for other models who need categories (maybe this is
2009 May 22
1
rails 2.3.2, active scaffold, nested, ActionView::TemplateError (undefined method `format_column' for #<ActionView::Base:
Before I dig in any further (since I have no idea where to go from here...) Has anyone been succcessful with 2.3.2, AS, and nested scaffolds? I have the latest of AS and the render_component plugin via % script/plugin install --force git://github.com/lackac/render_component.git -r rails-edge I have an AS user_controller: active_scaffold :user do |config| ...
2011 May 21
0
Jquery UI with rails nested forms
I am very beginner to ruby on rails and web-development. I created my app that similar to Ryan Bates, episode 197 and 198, but with use JQuery UI datepicker. But I dont really know how to do that. I know that the problem is with element ID always same whatever I generated new dynamic partial. For example, when I choose a day, it works fine. but when I add new nested model (or record), only the
2011 Aug 29
1
jquery datepicker not working with nested forms rails 3
Hi people I have a problem with the Jquery "Datepicker". If I use datepicker in a simple-form, I have no problem... but I need to use it in a nested form that add fields dynamically, and everytime I add new fields I have a field that needs to use datepicker. I''ve reading the web, and many people have the same problem, but nobody get a solution for this issue Could you help
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following: My Controller: def new . . @teammembers.each do |teammember| request = @request_thread.requests.build(:recipient_id => teammember.user_id, :full_name => ''Billy Bob T'') end My View: . . <%= f.fields_for :requests do |builder| %> <div class="field"> <%= builder.label
2010 Sep 17
1
option_groups_from_collection_for_select
Hi, in my development environment (Ruby 1.87, Rails 2.3.8) the following code works fine: <%= select "applicant", "member_1", option_groups_from_collection_for_select(@topics, :members, :topic, :id, :name, @applicant.member_1), {:include_blank => true} %> Producing: <optgroup label="Clinical Neuroscience"> <option value="1">Prof
2009 Jul 09
0
Nested forms, dynamic elements and valid xhtml/DOM ids
Hi, I would like to know if anyone has been able to implement correctly 2.3 nested forms and create dynamically (javascript) a bunch of nested elements with their correct DOM ids. I''ve seen Complex forms Railcasts but they use pre-2.3 nested forms. I''ve seen Alloy solution but it is not working properly to me. When creating more than two lines dynamically the id is repeated.
2009 Aug 01
0
Nested forms and deleting/removing has_many associations
I am using nested forms on person model that has many pictures. I would like to allow the user to remove on or more of the associated pictures from the person using nested forms as suggested by Ryan Bates. However delete will delete the picture not remove the associatioon I can do it in the controller, but it should be done in the same way as delete is performed using attribute _delete Anyone
2010 Jun 24
0
Nested Model Forms
I''m trying to get a multi level nested form model working but have hit a problem. In one of my models, I have a habtm association and it''s throwing an error on a nested form and these are check boxes with a method of ''time_unit_ids[]''. The nested forms work without the habtm (time_unit_ids[]) so things are pretty much set up okay. Here''s the set up
2010 Jan 20
0
need help with nested forms and habtm
Hi, I''m currently stuck with a problem I just can''t find a clever solution for. I checked every tutorial, issuetracker, API reference I could find but found nothing to "enlighten" me --> I desperately need your help :-). My Question is: is it possible to use nested forms for habtm associations? --> Here some more info about what I wanted to do and what failed
2010 Aug 11
0
[PATCH] prototype rails.js fix for forms with multiple submit buttons
Hello, Please see my ticket at https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5356 for a fix for supporting multiple submit buttons in forms using the prototype version of rails.js. The ticket goes into more detail. Please let me know of any changes, comments, etc. My javascript-fu is not as good as my ruby-fu. Thanks -- You received this message because you are
2009 Apr 21
0
Nested forms without looping through fields_for collection.
Hi, I have a fairly complex form and I am wondering if it is even possible to do what I am attempting. I have multiple models included in the form. A small example would be the following: Company has many Locations Company has many PhoneNumbers... and so on I have this working without issue using Rails 2.3 and nested forms. Where this becomes complex is that I also have another model named
2009 Jun 01
0
Nested models and forms
Hi, I have been trying to use the new nested models & forms feature in rails 2.3 #helper def add_job_profile_link(name, form, vacancy) link_to_function name do |page| profile = render(:partial => ''job_profile'', :locals => { :f => form, :job_profile => vacancy.job_profiles.build }) page << %{
2011 Mar 02
2
Nested forms validation problem
Hi All, I''m trying to learn Ruby on Rails and have got an issue with the validation of a nested form. I think I have got it setup correctly as it appears to be saving the data as expected, but it is not wrapping the CSS class (field_with_errors) to the fields, and if data is entered into the nested fields it disappears on form submit (if there are validation errors). The validation
2009 Jun 29
0
Problem with 2.3 nested forms and new elements
Hi, I''m using the new nested forms functionality and I having problems with new created elements. I have an invoice with lines. I would like to be able to create a new invoice, in the same form insert new lines dinamically and saving the invoice and the lines when everything is validated, not before. The problem is that when I add a line dinamically to the form, the new line created
2009 May 27
0
Nested Forms with has_many associations with validations
I want to have a parent model that I can add child objects (via a has_many association) using the rails 2.3 nested form syntax. However, it seems like rails throws an error during validation of the parent model if I have a validates_presence_of :parent_id defined in the child model. Is the only solution to this to remove the validates_presence_of :parent_id? This seems like a hack-ish workaround.
2013 Mar 26
0
nested forms: use validate :some_method works in update mode only
I have a strange behavior when validating a record in a nested form. The association collection is empty when creating a new record and the validation does not catch the error. But when updating the same record the validation gets it right but continues to catch the error even after modifying the needed attribute value to make it pass. Here is the model: #timesheet.rb class Timesheet <
2010 Jan 21
2
nested forms and attr_accessable
Rails 2.3.5 I am working on a nested form that assigns roles to users through a table called clearances. I have attr_acessable turned off globally in an initializer: ActiveRecord::Base.send(:attr_accessible, nil) I have this set in clearance.rb attr_accessible(:description, :effective_from, :role_id, :superceded_after, :user_id) And this is what params looks like after the
2008 Nov 18
0
Scoping option_groups_from_collection_for_select
How can I scope the options returned by option_groups_from_collection_for_select? Method calls look like this: option_groups_from_collection_for_select (collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil) But say I want to limit the results returned by the option_key and option_value methods to some particular scope? For instance, using the