Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Rafael Adel
This is really driving me insane. I've something very similar to your sample Here . I've specified table names inside models. But still the error occurs. Would you mind taking a look at it ? Thank you a lot so far for your time. On Thursday, April 30,

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Chris Lerum
https://github.com/chrislerum/factory setting table_name seems to be the sweet spot, working now On Thursday, April 30, 2015 at 8:01:49 AM UTC-4, Chris Lerum wrote: > > you could try, in the model, self.table_name = "seven_gallery_photos" etc. > > On Thu, Apr 30, 2015 at 4:09 AM, Rafael Adel >

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread chris lerum
you could try, in the model, self.table_name = "seven_gallery_photos" etc. On Thu, Apr 30, 2015 at 4:09 AM, Rafael Adel wrote: > Are you sure about this ? If so, is there a way to make it working without > changing table names ? > > > On Thursday, April 30, 2015 at 3:45:46 AM UTC+3, Chris Lerum

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Rafael Adel
Are you sure about this ? If so, is there a way to make it working without changing table names ? On Thursday, April 30, 2015 at 3:45:46 AM UTC+3, Chris Lerum wrote: > > In short, yes. See this lovely article; notice the conspicuous absence of > any talk of changing table names: > > http://blog.

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
In short, yes. See this lovely article; notice the conspicuous absence of any talk of changing table names: http://blog.makandra.com/2014/12/organizing-large-rails-projects-with-namespaces/ On Wednesday, April 29, 2015 at 1:59:04 PM UTC-4, Rafael Adel wrote: > > I can see the only difference is t

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
Not sure how useful this is, but I get it working if I change the table names to 'galleries' and 'photos'. updated: https://github.com/chrislerum/factory On Wednesday, April 29, 2015 at 1:59:04 PM UTC-4, Rafael Adel wrote: > > I can see the only difference is that in my case there's namespace in

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Rafael Adel
I can see the only difference is that in my case there's namespace in front of the table names and FK. But in yours there's none since it's a normal app. But is this the cause ? On Wednesday, April 29, 2015 at 6:53:18 PM UTC+3, Chris Lerum wrote: > > https://github.com/chrislerum/factory > I tri

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Rafael Adel
I can see the only difference is the namespace of the engine is used but in your case is not, since it's a normal app. But is this the cause ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiv

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
https://github.com/chrislerum/factory I tried whipping up an app with your code, the controller test passes fine for me, see if it works for you and compare. On Wednesday, April 29, 2015 at 10:32:47 AM UTC-4, Rafael Adel wrote: > > I'm trying to create a `photo` factory that's in a many to one as