Questions tagged as 'ruby'

2
answers

How to register a new Person when creating a new Customer

I have a question that has already been broken for a while, next, I have a Person model, which is the generic person and the Customer model, which belongs to Person, like this: class Person < ActiveRecord::Base has_one :customer has_on...
asked by 02.08.2016 / 01:42
1
answer

Change date format in rails form

I know there is a way to edit the location, to move it to the Brazilian format. But I do not know the syntax for changing the format in the form: <div class="field"> <p> Garantia </p> <%= f.date_select :guarantee...
asked by 22.07.2015 / 21:32
1
answer

can not load such file - config / boot (LoadError) - redmine ruby

I had redmine installed on a ubuntu server 12.04 I decided to upgrade from redmine to the new version. After following all the steps in this tutorial: link I'm getting the error message below. How to proceed? /usr/lib/ruby/1.9.1/rubygems/c...
asked by 14.08.2014 / 20:52
1
answer

belongs_to has_many search information in the table

I have 2 tables: user and contact , and I created a third one for linking the two: user_contact : class User < ActiveRecord::Base has_many:user_contacts end class Contact < ActiveRecord::Base has_many:user_...
asked by 09.08.2014 / 20:08
1
answer

Problem with "confirmable" gem module "devise" in RubyOnRails

I was implementing the gem Devise in RubyOnRails and everything was working perfectly. Then I went to add the "confirmable" module. I took the following steps: I added :confirmable to Usuarios.rb : class Usuario < Activ...
asked by 28.04.2014 / 14:34
3
answers

Managing Ruby / Rails Versions in Windows

I use Windows and I have Ruby / Rails installed on my machines using Rails Installer . Currently I have installed Ruby 1.9.3 and Rails 4.0.2. Today I read about the new Rails 4.1 and thought: If I installed Rails 4.1 on my machine,...
asked by 30.04.2014 / 14:46
2
answers

How to initialize has_many attributes in Rails automatically

Currently I have 3 models class Regiao < ActiveRecord::Base has_many :tipofretes has_many :valorfretes, through: :tipofretes end class Tipofrete < ActiveRecord::Base has_many :regiao has_many :valorfretes, through: :regiaofretes...
asked by 18.06.2014 / 16:35
1
answer

Sending Records for a New View

I created a new action knowledges in my controller responsabilities and created a view called nested_knowledges . I made the action render this view. I put the following code in this view: <%= form_tag edit_responsab...
asked by 03.06.2014 / 17:02
1
answer

Ruby installing OpenCode GEM (tray)

I'm new to Ruby, and a client wanted me to make a template using famashop link link I am following the developer manual to install. But I did not get results, I tried to ask for help for the support. But they did nothing more than p...
asked by 01.09.2015 / 14:33
1
answer

Access a hash / list in a class

Hello. I'm an intermediate student in python, and recently I started studying Ruby, but like every new language, comes a few minor difficulties. My question is: Where is the error in this? I used the has_key?() function outside of t...
asked by 13.11.2018 / 02:27