Most voted "rails4" questions
65 questions
Sort by count of
-
0
votes1
answer30
viewsConstant charging
I’m having trouble with the model report. Console: LoadError (Unable to autoload constant Report_questao, expected app/models/report.rb to define it): app/controllers/pessoas_controller.rb:49:in…
-
0
votes1
answer279
viewsNameserve: Undefined method `send_data' for Clonedatabase:Class
Rails does not find method send_data clone_database.rb require 'zip' class CloneDatabase < ApplicationController def self.make_clone zip_data = 'a'.to_json send_data zip_data, type:…
-
0
votes1
answer45
viewsRegular expression for zip file
How to add a zip file instead of an image? class UploadDatabase < ActiveRecord::Base has_attached_file :zip_file, styles: { medium: "300x300>", thumb: "100x100>" }, default_url:…
-
0
votes1
answer49
viewsRails 4 - Has_many problems
I need help displaying in the view the value in the view of a relationship with has_many. I have my product model: class Product < ActiveRecord::Base paginates_per 15 has_many :product_images,…
-
0
votes2
answers356
viewsRead TXT file on Rails
I have an application in Ruby on Rails and I need to read a particular file txt which will be sent by the user. After sending the file, the file data will be displayed to the user so that it…
-
0
votes2
answers187
viewsCounter on model
I’m looking for a way to add an incremented variable to the id of a div, could someone tell me the most recommended way to do this? my difficulty in making this increment is due to the Cocoon that…
-
0
votes0
answers34
viewsPosition number of Rails pages
I am trying to put the number of pages in the pe wheel, but when giving the crtl+P to print the number is just below the content, that 99% of the time is either half the page or a little below it.…
-
0
votes2
answers72
viewsQ. Rails Undefined method `full name_for #<Room:0x0000000ed6d478>
My Controller: class RoomsController < ApplicationController before_action :set_room, only: [:show, :edit, :update, :destroy] def nome_completo "#{title}, #{location}" end # GET /rooms # GET…
-
0
votes1
answer41
viewsHow to perform a has_many interaction query in Ruby on Rails
I’m having difficulty searching with has_many interactions in ruby on Rails. Goal is to search all vehicles that have no fines type 'guy'... The problem is that the query I made still returns…
-
0
votes0
answers411
viewsHow to redirect after login - Rails
Routes: Rails.application.routes.draw do get 'home/inicio' root 'login#new' scope "/login" do get "/acesso", to: "login#create" post "/acessorecebendo", to: "login#create" get "/sair",…
-
0
votes1
answer577
viewsworking with decimal {5,2} Rails
I created my first API in Rails, and I’m using a simple model with to create a basic Crud, I managed to put my application to work I created the cute GET method returned 200, but in my POST is…
-
0
votes1
answer30
viewsError while trying to create a Rubyonrails controller in Windows environment using Gemfile Gem tiny_tds
I have set up in Windows OS a Rubyonrails environment and need access to a bank MSSQL with a base already created and populated, I just wanted to query the database and return data through the…
-
0
votes1
answer45
viewsHeroku Rails 4 Assets do not load
After I have deployed these files below are not being loaded. This is my directory This is my application.Rb Here as they are being called <%= stylesheet_link_tag "home" %> <%=…
-
0
votes1
answer84
viewsRuby on Rails Routes
Guys I’m starting at Ruby on Rails and I had a problem with the calls nested Routes: class Maquina < ApplicationRecord has_many :verificacaos accepts_nested_attributes_for :verificacaos end class…
-
0
votes1
answer10
viewsActs_as_indexed . with_query() does not return the expected results in the query
Good afternoon, I have a method to search for products in the bank that uses the with_query method of Gem acts_as_indexed: Product.with_query(query_text) This generates an SQL query like this:…