Questions tagged as 'ruby-on-rails'

1
answer

How do I add more rows to a class in Ruby?

I started to venture into the rubygems world. I am developing a gem to generate the assets of my twitter bootstrap-style application, since I intend to reuse my front-end code. All I need to do is put the assets in the correct places, add some h...
asked by 23.03.2015 / 13:41
2
answers

Initialization of instance variables in ActiveRecord

I am having trouble initializing instance variables in Rails, I need to use a variable in several methods, but this needs to be initialized beforehand, for example: class Test < ActiveRecord::Base @test = 1 def testar @test+1...
asked by 19.11.2014 / 14:47
1
answer

Installation template wrapbootstrap

I bought the Genius Bootstrap template and had a problem using it along with Rails. I performed the following steps: I created a new app (rails new experiment) [Rails 3.2.13] I moved the contents of the assets folder from the template to vend...
asked by 17.02.2014 / 20:11
2
answers

NoMethodError in Users # show

I'm learning Rails, following a book that has the following code: UserController class UsersController < ApplicationController def new @user = User.new end def edit @user = User.find(params[:id]) end def show @user =...
asked by 05.02.2014 / 17:55
1
answer

How to make routes with optional and ordered parameters in Rails 4?

How do I make a route like this? site.com/clothing/men/T-Shirts_type/Nike_brand/100-500_price/Red,White,Blue_color/ site.com/clothing/woman/Nike_brand/100-500_price/Red,White,Blue_color/ It should always be in the following order: site.c...
asked by 20.02.2014 / 13:40
1
answer

Creating Scaffold's for plugins in Redmine

How do I create a Scaffold in a plugin of REDMINE?     
asked by 28.03.2014 / 13:10
1
answer

How to find out the number of records in a model?

I created a scaffold called a book and wanted to create a method for counting how many book entries exist in my database and use that result in the controller of another scaffold called a bulletin board where it will show the total number of boo...
asked by 03.06.2018 / 20:02
1
answer

Note system [params]

I'm creating a note system with clients, projects, activities, professional and pointing, all parts pass and save correctly, less the part of note posting. Follows the error image while trying to point it out. Followthenew.html.erbcode &...
asked by 30.10.2017 / 04:41
0
answers

nested attributes through

I own 3 models: class Day < ApplicationRecord belongs_to :goal has_many :day_salesmen, dependent: :destroy has_many :salesmen, through: :day_salesmen validates_presence_of :date_day, :goal_id accepts_nested_attributes_for :day_sa...
asked by 31.10.2017 / 23:14
1
answer

Create a ruby on rails feature list

I have been trying for a few days but I have not been able to solve my problem. I need to create a feature list for an item and then list all of them. I wish they could help me or pass me some tutorial on. Home Well I have a person's registry an...
asked by 29.04.2017 / 18:45