Hi,

Since "belongs_to" does not actually reflect (as an English wording) the 
real association that one object might have to another, I was thinking 
about aliasing it using the following code:

class ActiveRecord::Base
  class << self
    alias :refers_to :belongs_to
    alias :is_of     :belongs_to
    alias :has_a     :belongs_to
  end
end

Is it a proper way to do that? Or Is there another better alternative?

Panayotis Matsinopoulos


-- 
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-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/Ik9mlWZ7jGEJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to