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 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'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...
In a Ruby on Rails app, say I have an Item and an Order model as follows:  class Item   :name   :default_price end   class Order   :customer   :item_id   :order_price end   On an Order form, I can automatically populate the order_price field with the...
I am using a gem https://github.com/ryanb/nested_form and I have a model which has accepts_nested_attributes_for. While it works nice, sometimes I want to be able add / remove (mostly add) a form on a page which is always added / removed by a button:...
In my Vue.js frontend app I wanted to create form to POST json data to REST API. The form has one part where I GET json data from API which is list of possible to add groups.   Vue.js code looks like  <script>   export default {     data () {...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.