Legacy version of the Ruby on Rails web development framework.
Questions tagged [ruby-on-rails-2]
746 questions
0
votes
1 answer
convert map.with_options in rails 3 way
Following are routes of todos plugin of redmine but it is in rails 2 way
map.resources :todos, :name_prefix => 'project_', :path_prefix => '/projects/:project_id',
:member => {:toggle_complete => :post }, :collection => {:sort => :post}
…

urjit on rails
- 1,763
- 4
- 19
- 36
0
votes
5 answers
Issue with Rails 2.3.5 Active Record Conditions for IN
I am having a issue using active record conditions in rails 2 with postgres. My problem is when ever I try to use this query (I am using geokit, but that is not the issue)
Table.all(:conditions => ["id IN (?)", id_array.join(",")], :origin =>…

Red
- 2,256
- 5
- 25
- 38
0
votes
2 answers
using :reject_if to check for empty field
In Rails 2.3.5 model I am using
accepts_nested_attributes_for :questions, :reject_if => lambda { |a| a[:content].blank? }
But its rejecting if there is the textbox is not empty..
How can I make it to reject only if there is nothing entered into…

Vamsi Krishna B
- 11,377
- 15
- 68
- 94
0
votes
1 answer
Exchange Data Between Two rails applications
I have two applications App A(rails 2.2.2) and App B(rails2.3.11) and both resides in Heroku.
App B is the Upgraded Version(in terms of functionality) of App A.I have some models(say 4) which are similar in context(but their associations varies),…

Sai
- 135
- 1
- 14
0
votes
1 answer
Which prawnto repository for rails 2.3.x?
git://github.com/thorny-sun/prawnto.git and http://cracklabs.com/prawnto are gone.
Where is the good prawnto for rails 2.3.x now?

ohho
- 50,879
- 75
- 256
- 383
0
votes
2 answers
checking if params exists in rails
This is what I'd like to do:
I have this piece of code:
customer = Customer.find(:first, :conditions => {:siteId => params[:siteId], :customerCode => params[:id]})
If :customerCode is null, I'd like to use :temporaryCode instead. But I don't know…

Aldrin Dela Cruz
- 205
- 1
- 4
- 15
0
votes
0 answers
uninitialized constant Delayed::DelayProxy::Job with delayed_job 2.0.7
I installed DJ via gem, version 2.0.7 for a rails 2 project.
I added
require 'delayed_job'
Delayed::Worker.destroy_failed_jobs = false
Delayed::Worker.max_attempts = 5
to an initializer.
When I try to .delay something I get
NameError (uninitialized…

Phil
- 145
- 8
0
votes
1 answer
How to store the id from the one table to another in ruby on rails 2
Hello i'm trying to make a simple review function on ruby on rails. i have create a scaffold with the following attributes
event_id:integer name:string review_text:text no_starts:integer
Then i made this change on the show (view) of my event
…

George Panayi
- 1,768
- 6
- 26
- 42
0
votes
1 answer
Rails 2.3.8 routing equivalent of Rails 3 match
What is the equivalent of match 'aliased/route/here' => 'pointed/route/here'?
I'm banging my head on the wall here, because I can't get Devise to work with different login url's for the same model. If anyone has tips regarding this issue, I…

Justus Romijn
- 15,699
- 5
- 51
- 63
0
votes
1 answer
Using Twitter Bootstrap with a Rails 2.3 app
We have a Rails 2.3 app with SASS and want to use Twitter Bootstrap. We use Jammit to package our JavaScript and CSS (after being generated by Compass).
Is there an easy way (or instructions) on how to integrate the Twitter Bootstrap (and LESS) with…

Chris Butler
- 733
- 6
- 23
0
votes
1 answer
Monkey Patching Time.strftime not being picked up by Time class
I need to Monkey patch strftime in Ruby 1.8.7 with Rails 2.3 on Windows. In config\initializers I put this time_patch.rb file (code below) but it does not seem to be picking up:
if RUBY_PLATFORM =~ /mingw32|mingw64|mswin32|mswin64/
class Time
…

ScottJShea
- 7,041
- 11
- 44
- 67
-1
votes
2 answers
create a new table with one-to-many relationshiop
I have an old rails project using Rails 2 . There is already model class Student. In database, there is a table students. Now, I need to implement that each student can have multiple courses. Which means I need to have a new table in database…

Leem
- 17,220
- 36
- 109
- 159
-1
votes
1 answer
Safe way to allow Rails code review?
I have someone interested in purchasing my Rails app (2.3.18). It requires updating (obviously), and now it's a question of the cost of updating versus rebuilding from scratch.
If the buyer wants to have third-party developer review the code to…

KDP
- 634
- 1
- 11
- 31
-1
votes
1 answer
Validation is giving error while editing the form in rails 2?
When i used the following piece of code in my model it worked fine for creating a new entry but when i tried to edit the form i am getting the same error message, which is showing for creating a new one. Actual problem is that when i edit the same…

Chethan Kumar IL
- 19
- 5
-1
votes
1 answer
Access rails 2.2.2 config in an initializer file
I have a couple of lines in my config/environments/production.rb environment file for a rails 2.2.2 app, which only do anything when i'm running on my local machine:
if ENV['HOME'] == "/home/max"
#fall back to the default logger instead of hodel,…

Max Williams
- 32,435
- 31
- 130
- 197