On Fri, Sep 3, 2010 at 8:38 AM, Rick R wrote:
> On Fri, Sep 3, 2010 at 6:07 AM, Satsou Sa wrote:
>
>> I had tried to write those factories:
>>
>> Factory.define :article do |f|
>> f.title "Hello, world"
>> end
>>
>> Factory.define :comment do |f|
>> f.content "Awesome!"
>> f.associati
On Fri, Sep 3, 2010 at 6:07 AM, Satsou Sa wrote:
> I had tried to write those factories:
>
> Factory.define :article do |f|
> f.title "Hello, world"
> end
>
> Factory.define :comment do |f|
> f.content "Awesome!"
> f.association :article
> end
I'm still pretty newb, so I could be wa
Hello,
I have this kind of relation:
class Article < ActiveRecord::Base
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :article
attr_protected :article_id
end
The default scenario inside controllers looks like:
@article = Article.create(:title => "fo
3 matches
Mail list logo