Posts by Thadeu Esteves Jr. • 121 points
8 posts
-
0
votes1
answer48
viewsA: Form Many to Many Rails
For Many To Many in your case it could be: Course has_and_belongs_to_many :internships, :join_table => :course_internships Internship has_many : course_internship belongs_to : belongs_to…
ruby-on-railsanswered Thadeu Esteves Jr. 121 -
0
votes1
answer107
viewsA: Rails routing error - uninitialized Constant
One thing, inside the controllers you must have a folder nivel_intermediario and inside it the file historias_controller.Rb. You can send a print of your controllers folder?
-
0
votes3
answers2889
viewsA: Running my Angularjs application on some server
You can have many servers running at the same time and for different Ips yet. Example rails s -p 8080 -b 0.0.0.0 -p = Port -b = Bind Address…
-
1
votes1
answer272
viewsA: Ruby on Rails - Randomize JSON variable and apply in Array
Turns out you say it’s only '=', try adding with << and see what happens. times << $parametros[populacaoInicial''].to_i Or else http://ruby-doc.org/core-2.2.0/Array.html#method-i-push…
-
0
votes2
answers91
viewsA: Validation of has_and_belongs_to_many in Ruby on Rails
Ben-Hur, Your logic is almost right, but for Many to Many there is a simpler way to do it, rather than using many has_many on multiple tables, Example class PedidosProdutos < ActiveRecord::Base…
-
0
votes2
answers64
viewsA: Error giving puts of a variable within the DEF
Use "#{@variable}" whenever you want to print a "" Example puts "IP: #{@ip}"
-
0
votes4
answers396
viewsA: Select without id field (Ror)
You can use method except http://apidock.com/rails/ActiveRecord/SpawnMethods/except Example Model.find(10).order('id asc').except(:id) Or else at the time of mounting a . each you can reject a…
-
1
votes3
answers601
viewsA: Mandatory fields depending on the form
I think the best way to do this is to validate with JS(Javascript), using the Required=true tag in HTML and putting a validates :name, :age, :address presence: true in the Model…
ruby-on-railsanswered Thadeu Esteves Jr. 121