Questions tagged as 'ruby-on-rails'

1
answer

Routing problem to access the driver

Hi, I'm a rookie in Rails and I have trouble accessing a controller method from a view. I created a form in the view <form id="form-cargaMasiva" action="/redmine/issues/load" method="get"> ... ... ... </form> my goal is tha...
asked by 10.11.2016 / 12:22
1
answer

Problem with paperclip after inner join

I have 2 tables ( members and pics ), and I just made a inner join and now when I send a call to the image in the view, it does not send me the url of the image anymore. Before the join it showed the data like this....
asked by 26.10.2016 / 20:04
1
answer

Calculate values from one table to another

I would like to know how I can calculate the "used" and "quantity" values of two models that I generated earlier called bidon and control . This is the schema create_table "bidons", force: :cascade do |t| t.integer "usado" t.datetime "c...
asked by 03.11.2016 / 19:11
1
answer

Minimagick resize image

I'm trying to make a crop with minimagick in Rails and something strange is happening. The code is as follows: def resize_crop manipulate! do |img| img.resize model.width end # resize_to_fill model.width, 0 end The fi...
asked by 14.03.2017 / 21:35
0
answers

Showing errors in Rails with Ajax

I have a form with ajax that I show in a modal, but if this modal does not comply with the requirements the form does not pass, but it does not show which are the errors of the form, I hope you can help me: contacts / shared / _error.html.er...
asked by 18.12.2016 / 18:20
3
answers

Problem Ruby on rails with missing dependencies

I'm starting to work with Ruby on rails on ubuntu 14.04. When doing $ bundle install I get the following error: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue. Make sure that 'gem install sqlite3 -v '1.3.11...
asked by 03.04.2016 / 02:51
3
answers

Send email depending on the date

I'm doing a small agenda in Ruby on Rails, I currently use UserMailer to send emails, but I can not find the way to send mail according to the date of my created event. For example, if I create an event in my calendar today for 3 days, I woul...
asked by 19.09.2016 / 17:52
1
answer

Ruby On Rails - Update method does not work

I am having problems with the Destroy method of my RoR application. Having a list of restaurants, and wanting to modify one of them by clicking Edit, all my entries are modified when I only want to modify the selected one. Here's my code:...
asked by 17.01.2017 / 15:37
2
answers

Update quantity of a model from another

I am working on a project where there is a Stock of Bidons (Drums) , but I would like to edit the main Stock of this when that Stock is taken in another model , for example when you make a purchase of a main product and this Stock is subtrac...
asked by 18.10.2016 / 12:04
1
answer

Problem to update a hash array

Good morning, I have a problem creating a form that allows me to update several models, I'm using the create method to update the models, the detail is that the form sends me the parameters belonging to a payment arrangement (payrolls) , one lin...
asked by 27.05.2017 / 19:01