Legacy version of the Ruby on Rails web development framework.
Questions tagged [ruby-on-rails-2]
746 questions
0
votes
1 answer
Cannot modify association because the source reflection class is associated via :has_many
My associations in a Rails 2 project are as follows:
class Role < ActiveRecord::Base
belongs_to :user
has_many :attrs, :through => :user, :dependent => :destroy
end
class User < ActiveRecord::Base
has_many :roles, :order => 'id DESC',…

berk ley
- 1
- 1
0
votes
1 answer
Does Ruby on Rails support document relative paths?
As far as I can tell url helpers in Ruby on Rails only generate site root relative paths.
So if I want to go from http://exemple.com/categories/1 to http://exemple.com/questions/12 the link will be /questions/12 (site root relative path).
Are…

Dorian
- 2,571
- 23
- 33
0
votes
1 answer
Why isn't Rails recognizing nil if blank in my form?
I'm reworking a Rails 2 website. Right now, I'm getting an error, and I think it's because a value is being submitted as blank instead of .nil. However, my attempts to keep it nil don't seem to be working. I appreciate any help you have to…

KDP
- 634
- 1
- 11
- 31
0
votes
2 answers
How do I set a selected option in this Rails 2 selection form?
I am editing a Rails 2 application. In it, a user submits a form that includes a dropdown menu, and that information creates a record in my database. When the user goes to edit the record, I want to show the saved "selected" option in the dropdown…

KDP
- 634
- 1
- 11
- 31
0
votes
1 answer
Can't get sibling element text with jQuery
I have the following markup:
2 | 0.0 | …