Questions tagged as 'ruby-on-rails'

1
answer

Gem will_paginate does not load when deployed on Heroku

Initializing repository, done. Counting objects: 3605, done. Delta compression using up to 4 threads. Compressing objects: 100% (1035/1035), done. Writing objects: 100% (3605/3605), 7.57 MiB | 71.00 KiB/s, done. Total 3605 (delta 2463), reused 36...
asked by 29.01.2014 / 20:25
2
answers

Error executing implementation test

I use Travis-Ci (as learning) to better understand implementation testing. Since build 14 I have this error link I had a small change while sending the file gemfile.lock, but the error still persisted.     
asked by 31.01.2014 / 18:32
1
answer

Do not use hidden_field fields in nested forms

I would like to know if there is a better way to work with nested attributes without having to send the id of the parent object through the hidden_field field, I find it unsafe to leave this to the page. Suggestions? Here is the...
asked by 12.02.2014 / 17:22
1
answer

Use of Nested Attributes with relationship table "has_many through"

I have the following problem, I have a relationship: class Servidor < ActiveRecord::Base has_many :lotacoes, :through=>:servidor_lotacoes has_many :servidor_lotacoes end class Lotacao < ActiveRecord::Base has_many :servidores...
asked by 23.05.2014 / 23:03
1
answer

Gravatar in ruby-on-rails 3.2

Following the railscast tutorial to add an image of the site I found an information lagged with rails updates. The code to create a default image in the case of absence of registration in the gravatar site does not work as in the code below su...
asked by 10.02.2014 / 21:36
0
answers

wicked_pdf trying to use wrong version of Ruby

I'm getting this error: Failed to execute: ["/var/www/apps/menucontrol/shared/bundle/ruby/2.3.0/bin/wkhtmltopdf", "-q", "--margin-top", "3", "--margin-bottom", "29", "--margin-left", "10", "--margin-right", "3", "--footer-html", "file:////tmp...
asked by 01.11.2018 / 15:11
0
answers

How to put the menu button on the left in the mobile view?

I'm editing the header of a project and would like to put the header button on the left in the mobile view, but I can not. What should I do? <nav class="[ navbar navbar-fixed-top ][ navbar-bootsnipp animate ]" role="navigation"> &l...
asked by 24.09.2018 / 18:27
0
answers

"Toasts" Alert Materialize with Rails

I am having a poor understanding of how to apply Materialize Toasts in a Rails code. <% if notice %> <p class="alert alert-success"><%= notice %></p> <% end %> <% if alert %> <p...
asked by 13.09.2018 / 04:49
0
answers

How to use senitize_sql_like together with ilike

I'm having trouble using senitize_sql_like , along with ilike . When I use it, the query is not returning the expected value, following implementation used: scope :brand_name_by_content, -> (brand, sna) {sna.top_contents.where(sanitize...
asked by 11.09.2018 / 03:53
0
answers

Google API authentication issues in Ruby

I'm developing an API in Ruby that communicates google-api-ruby-client but when I try to authenticate I get some errors. example of my code: class GoogleService require 'googleauth' require 'signet/oauth_2/client' require 'goog...
asked by 13.08.2018 / 23:37