Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
attributes[:xxx] does not work within model?
Joshua Muheim
8/19/2006 3:07:00 PM
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
--
Posted via
http://www.ruby-...
.
1 Answer
Joshua Muheim
8/19/2006 3:16:00 PM
0
Oh I'm sorry, wrong forum... Should go into the Rails forum.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
attributes[:xxx] does not work within model?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password