I am trying to implement nested models, here is the route file entry:  resources :projects do   resources :instances end   Following is the snippet for project controller:  # GET /projects/new def new   @project = Project.new   @project.instances.bui...
I am trying to use simple form with my rails 4 app.  I have a project model, which has a scope model. Scope belongs to project. I have a third model, called participant, which belongs to scope. Scope accepts nested attributes for participant and proj...
I want to style my Rails simple_form image upload field using Jasny's Twitter Bootstrap extension. I've already (successfully) been using CarrierWave to upload images.  Currently, my form works, and the code looks like this (I've taken aw...
I have a dropdown in my form that needs to render a new text input when the "Other" is selected. I have tried to do this with the following to no avail:   Rails View    <div class ="testinputs"       <li><%= o.input :name,...
I'm trying to update a text in a div with the value that the user selects in a dropdown list, using Simple Form on Rails5. It should work like this, but I can't get it to work in Simple Form: http://jsfiddle.net/zwzakdnv/  = f.input :service_...
I have a form with 2 dropdowns: collections and books. First dropdown shows all the collections. Unless some collection is chosen, a second dropdown has to be empty. And only when a user choses a collection, the second dropdown has to become filled w...
Thanks for your time.  I am working on rails 3.2 and I am using gems simple_form, cocoon, and rails3-jquery-autocomplete.  I have following models Machine, Part, PartUsage, MachineCosting and PartCosting  Machine and Part models with many-to-many ass...
I'm using simple form and trying to get the popover working for an Input.  The NEW form Input:  <p>           <%= f.input :title, input_html: { class: 'login-form-block',                                             id: "login...
I have two simple_form fields like this:    <%= f.input :ration_card ,as: :radio_buttons,collection: ["Yes","No"], input_html: {id: "rationcard"} %> <%= f.input :rationcardNum , label: "Ration Card No." ,input...
I'm very new to javascript so don't judge hard (any suggestions or comments would be highly appreciated).  I have a form in my rails app (haml file):  = simple_form_for(@book, remote: true) do |f|   .row   .form-group     = f.input :book_titl...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.