I am trying to use cocoon gem to build nested forms.   I have models for Organisation, Package::Bip and Tenor.  The associations are:  Organisation  has_many :bips, as: :ipable, class_name: Package::Bip     accepts_nested_attributes_for :bips,  rejec...
i have followed the railscasts episode on nested forms(part 1 and 2) and having difficulty with adding fields using jquery, however when i click the remove fields link, the field gets removed. Here is the code. In my question model i have  class Ques...
I'm trying to implement Ryan's Railscast #197 in a system with Questions, Answers, and (multiple choice) Options. http://railscasts.com/episodes/197-nested-model-form-part-2.   I have successfully implemented the nesting among these forms/par...
I have a has_many through association and I'm getting an error because I'm not passing the :ingredient_id as an array (or something like that, it's just a guess :) )  Error:Couldn't find Ingredient with ID=1 for MealIngredient with ID...
I have an application in which I'm using the gems rails3-jquery-autocomplete and nested_form to suggest existing users to be tagged as contributors to a project entry.  The form view:  <%= f.fields_for :contributors do |contributor|%>     &...
Through a combination of logic and a lack of experience with JQuery/Javascript, I have found myself with this problem.  Background - I am using the Jquery-deep branch of Complex-Form-Examples, which enables a form that creates/edits records for multi...
I'm trying to use cocoon-gem and summernote-gem in my ruby-on-rails app. This is my model:  class Dog < ApplicationRecord     has_many :pictures, as: :imageable, dependent: :destroy     accepts_nested_attributes_for :pictures, reject_if: :all_...
I have a ad banner that has a form and this is used by 3rd party site owners that grab this code and have this banner on there site.  Since some sites that use this banner have a <form> wrapping there entire site i have found that the banners f...
I am trying to set is_deleted to true on clicking remove. I am partially done with it but when I click on remove it just set the all nested departments to is_deleted true. Here is my parent form:       .h3 Process Step     = f.fields_for :departments...
I'd like to set some fields hidden until a user clicks on a checkbox, then they're supposed to show up and it works fine with the first load like so  $(document).ready(function(){   $(".m100check").click(function() {     $(this).paren...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.