Questions tagged as 'ruby-on-rails'

1
answer

ActionController :: ParameterMissing in CotizaciónController # create param is missing or the value is empty: quote

The context of the question is as follows: I generated the entity Cotizacions , through scaffold . The corresponding view, model and controller was created: quote_controller.rb , quote.rb and views ( _cotizacion.json.jbuilder...
asked by 29.07.2017 / 18:20
1
answer

Rails. Render a partial within another partial with tabs

In my show.html.erb I have a nav-pills . Each of those " pills " have a tab-panel. Well, within these tabs panel I put text and, until now, I had not tried to render a partial one. The functionality of pills is made...
asked by 29.07.2017 / 00:45
3
answers

How to calculate an hour a and an hour b with time ruby

I'm doing a validation that has to be longer than 4 hours and I do not know how to do it. I have two attributes hora_inicio and hora_final , which belong to Time . In the first validation: def validar_horas if hora_i...
asked by 05.06.2017 / 18:39
1
answer

How to add values obtained from the same field?

I would like to calculate the values of a specific field in my table item_compras create_table "item_compras", force: :cascade do |t| t.integer "cantidad_bidon" t.integer "total_bidones" end I am using accepts_nested_att...
asked by 22.05.2017 / 16:41
1
answer

Periodically mailing [closed]

I have been investigating for days what is the best way to send "reminder payment" emails to the clients of my system periodically. I have found different gems that should work but the documentation is not enough, making me stuck in the proce...
asked by 21.05.2017 / 07:46
1
answer

Error executing the "rake" statement in Ruby on Rails

I have the following problem in my installation of Rails 4.1.0 and Ruby 2.4.0 . I could run bundle install , but when giving: rake db:create I get the following error:    /Users/felipevelasquez/.rbenv/versions/2.4.0/lib/ruby/gem...
asked by 20.05.2017 / 11:44
1
answer

How to pass a parameter in a link_to Rails

the question is the following, I have a Model called publications, in this model I have an integer attribute called: reason, what I want to do is that before the user accesses the view of the form to create publication there is a previous view w...
asked by 12.05.2017 / 04:12
1
answer

Ajax in ruby on rails, the remote process does not work: true

I have a form on the home page (all created with scaffold), which I would like when I click on the publish button, I will add the publication to the same home via ajax. add remote true to the form = form_for @post, remote: true do |f| e...
asked by 07.06.2017 / 20:50
2
answers

change database for each user

I am developing a multi-company website in which each company has its database and when the user logs in, he will then access the database of the company he is associated with, each user having a record called "empresa .id. " The problem comes w...
asked by 13.04.2017 / 15:36
1
answer

unknown attribute 'valoracion_id' for Rating

I get that error in the controller def create val=Valoracion.all val.each do |app| Rating.create(:user_id => params[:rating][:user_id], :app_id=> params[:rating][:app_id], :valoracion_id...
asked by 10.04.2017 / 22:33