With the help of a friend, I've found what's causing the error. In the
will_paginate plugin under tests/fixtures is a user.rb class defined
as class User ActiveRecord::Base. Rails was using that one instead of
one in my app/model. My new question is, why was it doing this? It
shouldn't have loaded
Thanks. That fixed that problem...but the other problem still exists. :
(
On Jan 2, 5:32 pm, "Jeffrey L. Taylor" wrote:
> Quoting Mike C :
>
>
>
>
>
> > I'm getting this very weird error and I can't figure out what the
> > problem is. I'm using acts_as_commentable. Basically, I have a partial
>
Quoting Mike C :
>
> I'm getting this very weird error and I can't figure out what the
> problem is. I'm using acts_as_commentable. Basically, I have a partial
> with this code in it:
>
>
>
> <%= link_to comment.user.login, profile_path(User.find
> (comment.user_id).profile
class Comment < ActiveRecord::Base
belongs_to :commentable, :polymorphic => true
# NOTE: install the acts_as_votable plugin if you
# want user to vote on the quality of comments.
#acts_as_voteable
# NOTE: Comments belong to a user
belongs_to :user
end
class Story < ActiveRecord
>
> profile_path(User.find(comment.user_id).profile) is the hack I've had
> to do to avoid this problem which is weird. All users have a profile,
> so they are accessible by user.profile. I get the stack overflow error
> when I do comment.user.id, but accessing comment.user.login or any
> other at
5 matches
Mail list logo