And tadda... for me it was reloading the console. I updated the relations
but didn't reload the console... D'oh!
On Saturday, August 25, 2012 10:44:22 PM UTC-6, tappind wrote:
>
> In the same boat here. Did you ever resolve this?
>
> Dan
>
> On Thursday, February 24, 2011 6:47:39 AM UTC-7, Mich
In the same boat here. Did you ever resolve this?
Dan
On Thursday, February 24, 2011 6:47:39 AM UTC-7, Michael Pavling wrote:
>
> > On 21 Feb., 11:31, Jim Ruther Nill wrote:
> >> could you confirm if the error still exists if you drop your db and
> >> remigrate?
> >>
> On 24 February 2011 13:31
> On 21 Feb., 11:31, Jim Ruther Nill wrote:
>> could you confirm if the error still exists if you drop your db and
>> remigrate?
>>
On 24 February 2011 13:31, rogi wrote:
> How can I drop and remigrate?
one alternative:
rake db:migrate VERSION=0
rake db:migrate
--
You received this messag
I tried following tutorial
http://biodegradablegeek.com/2007/12/understanding-basic-database-relationships-in-rails/
and also got the problem again:
irb(main):019:0> tune.genre = Genre.find_by_name('Blues Rock')
NoMethodError: undefined method `genre=' for #
So maybe i have a general problem .
How can I drop and remigrate?
On 21 Feb., 11:31, Jim Ruther Nill wrote:
> could you confirm if the error still exists if you drop your db and
> remigrate?
>
>
>
>
>
>
>
>
>
> On Mon, Feb 21, 2011 at 5:30 PM, rogi wrote:
> > class Worker < ActiveRecord::Base
> > has_many :trainings
> >
On 21 February 2011 10:50, Colin Law wrote:
> This really makes no sense to me.
+1
Everything looks good... nothing is jumping out at me - but the error
messages you're getting don't tie with what code/migrations you have.
> Have a look and remove anything extra there. Are
> you *absolutely* su
On 21 February 2011 09:30, rogi wrote:
> class Worker < ActiveRecord::Base
> has_many :trainings
> has_many :courses, :through => :trainings
> belongs_to :ressort
>
> def firstname_and_name
> first_name+" "+last_name
> end
> end
>
> ---
> class Ressort < A
could you confirm if the error still exists if you drop your db and
remigrate?
On Mon, Feb 21, 2011 at 5:30 PM, rogi wrote:
> class Worker < ActiveRecord::Base
>has_many :trainings
>has_many :courses, :through => :trainings
>belongs_to :ressort
>
>def firstname_an
class Worker < ActiveRecord::Base
has_many :trainings
has_many :courses, :through => :trainings
belongs_to :ressort
def firstname_and_name
first_name+" "+last_name
end
end
---
class Ressort < ActiveRecord::Base
has_many :workers
end
---
c
On 20 February 2011 16:59, rogi wrote:
> irb(main):038:0> Ressort.find(1).workers
> NoMethodError: undefined method `workers' for #
>
> irb(main):039:0> Worker.first.ressort
> ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
> ressorts.worker_id: SELECT "ressorts".* FROM "re
irb(main):038:0> Ressort.find(1).workers
NoMethodError: undefined method `workers' for #
irb(main):039:0> Worker.first.ressort
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
ressorts.worker_id: SELECT "ressorts".* FROM "re
ssorts" WHERE ("ressorts".worker_id = 1) LIMIT 1
On 20 February 2011 13:23, rogi wrote:
> No:
>
> ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
> ressorts.worker_id: SELECT "ressorts".* FROM "ressorts" WHERE
> ("ressorts".worker_id = 1) LIMIT 1
What command did you type to get this return value? It's certainly
weird if
This is weird. Could you paste your migration files and schema. Also, did
you override the find method
for Worker class?
On Sun, Feb 20, 2011 at 9:23 PM, rogi wrote:
> No:
>
> ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
> ressorts.worker_id: SELECT "ressorts".* FROM
No:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
ressorts.worker_id: SELECT "ressorts".* FROM "ressorts" WHERE
("ressorts".worker_id = 1) LIMIT 1
irb(main):037:0> Ressort
=> Ressort(id: integer, name: string, description: text, created_at:
datetime, updated_at: datetime
On 20 February 2011 12:47, rogi wrote:
> Nothing, I only had the typo here.
> So, still facing the problem!
Does it work the other way around? can you call "Worker.first.ressort"?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post
Nothing, I only had the typo here.
So, still facing the problem!
class Ressort < ActiveRecord::Base
has_many :workers
end
On Feb 20, 1:40 pm, Michael Pavling wrote:
> On 20 February 2011 12:33, rogi wrote:
>
> > Ressort
> > has_many: workers
>
> typo:
> has_many :workers
>
> ...move
16 matches
Mail list logo