Frederick Cheung wrote:

> It was deprecated in 1.2 and removed in 2.0
> 
> Fred

On the subject of error messages, with deprecations specifically in 
mind, I suggest the following approach at least be considered. 
Establish a deprecated_methods_index library at the top level of Rails 
so that, when someone finally decides to upgrade their Rails-1.0.6 app 
to Rails-whatever, instead of getting:

"undefined local variable or method `whatever'"
(which is generated by ruby itself and not by Rails)

one obtains the output from something like this:

def whatever(*parms)
  puts("whatever method is deprecated and was removed in rails-x.y.z.")
  puts("Use other_one method instead.")
end

If these are all kept in one place surely it would not be too difficult 
to maintain? Are there any downsides to this approach, other than having 
to write four lines of code for every deprecated method?
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to