Adam Akhtar wrote:
> 
> class Sentence < ActiveRecord::Base
>   belongs_to :user
>   has_many :corrections #previously has_one
> end
> 
> then It works. The problem is I dont want to specify has_many because
> there will only be one correction for a sentence.
>

So could you not use the has_many abilities of the framework (and 
achieve one of your goals) and enforce in your model your idea of a 
single correction per sentence (achieving your other goal)?

It might be the simplest solution.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to