Attributes[:xxx] does not work within model?

Hi all

I have a model User that contains the attribute avatar. I’d like to
rewrite the avatar method with something like that:

def avatar
“#{file_path}/#{attributes[:avatar]}”
end

Sadly attributes[:avatar] doesn’t seem to have any content (nil).
What have I done wrong?

Thanks, Josh

Oh I’m sorry, wrong forum… Should go into the Rails forum.