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'm submitting a form to my rails app, with two submit buttons.  They both go to the same controller action, and use the same form, but on one submit action i want to make the form target=_blank so that the form submission results open in a new w...
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...
<%= simple_form_for @product, method: :post, url: save_item_path do |f| %>     <tr>         <td>             Category         </td>         <td>             <%= f.input :category_id, collection: Category.all, label: f...
I have a form where I need the user to select (with radio buttons) an option that will determine the next form field beneath it. In this case, their post can be a post or a revision of a post. Thus, selecting 'post' will show a title field (t...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.