Questions tagged as 'rails4'

1
answer

How to disable a select associaition of the simple form

I have a select association of the simple form, the value of it passing through controler and I would like that in form the user did not have the option to select another value. I have tried to use disabled: true disabled: true, input_html: {dis...
asked by 07.07.2016 / 22:11
1
answer

Problem with nested form has_many through using dynamic form

I'm having the following problem on a form using has_many through. I have a registration where I created dynamic forms. These dynamic forms are inserted in another screen. I'm having difficulty in the controller where I insert these fomula...
asked by 22.06.2016 / 17:19
1
answer

Update stock before saving template with nested_attributes and gem cocoon

Friends, I have a form that uses nested_attributes and I use the cocoon gem. I have 3 models involved. Variation that contains the stock, Order, which contains the order and is the Detail parent that contains the order detail. The save is wor...
asked by 25.02.2016 / 17:24
1
answer

Nested objects has_one rails 4

Talk to people, I'm new to rails and I'm trying to make a crud with two objects, a Project and another Album. Project has_one Album, as test each only has one: name as parameter, but I can not create a Project with album. Here's my code: p...
asked by 22.01.2016 / 20:50
1
answer

Rails 4 + -jquery-datatable + ajax-datatable - Error 406 Http and ActionController :: UnknownFormat format json

I was studying rails and following the link tutorial. The steps in the tutorial were as follows, create a datatable that would make a request via json, the controller that would respond with the data and the data table would be populated....
asked by 15.09.2015 / 01:12
0
answers

Refresh combobox with data from another Rails table

I have a "professions" field that appears inside the "patient" table. The field "professions" is autocomplete with gene chosen. I want to create a "new profession" button where when searching the combobox and not finding the desired profession,...
asked by 13.11.2018 / 00:20
1
answer

Heroku Rails 4 assets do not load

After I deploy these files below are not being loaded. Thisismydirectory Thisismyapplication.rb Heretheyarebeingcalled<%=stylesheet_link_tag"home" %> <%= javascript_include_tag "home" %> <img class="client" src="<%= asset_...
asked by 28.06.2018 / 19:22
0
answers

Selection in source and destination lists

I'm starting RoR and I have a similar situation to using GEM Cocoom, the difference is I already have the data in the two tables related. And I would like to work with selection between source and destination lists. I call it the shelf. I have i...
asked by 04.05.2018 / 14:29
1
answer

Ruby on rails routes

I'm starting in Ruby on Rails and I had a problem with nested routes : class Maquina < ApplicationRecord has_many :verificacaos accepts_nested_attributes_for :verificacaos end class Verificacao < ApplicationRec...
asked by 23.01.2018 / 19:46
1
answer

Error trying to create in a Windows environment a controller in RubyOnRails using Gemfile gem tiny_tds

I set up a RubyOnRails environment on Windows OS and need to access a MSSQL database with a database already created and populated, I just wanted to consult the database and return data through queries. I saw that there is a gem called tiny_t...
asked by 13.12.2017 / 14:01