On 14/01/2008, Booking Heaven <[EMAIL PROTECTED]> wrote:

> Yes Sir, You're Right, I did set it to has_many before i posted the first 
> message. It said : NoMethodError: undefined method 'map' for #<User:0x47d4d18>
>
> Even when I try to another way using belongs_to not from your script but the 
> same outline with your mind and says error like the first.

Then i'm pretty sure your code is wrong, you can send us your total
spike codes or upload it somewhere and link it from here, so that we
can solve it later.

> What is "map" must be implemented to has_many? I think it works in any 
> Relational Object or Table. I dont know how your script is working well in 
> your Notebook.

That trick is an AR combination trick from this simple trick (if you
use haml you can do this)

= @objects.map(&:email)

and that @object must have been defined in its controller of course,
ex. @object = Object.find_all_by_permalink("i-am-lazy")

-- 
r9 = { name: Rie!, ym: riyari3, skype: rubyninja,
li: http://linkedin.com/in/ariekeren,
fb: http://profile.to/ariekeren,
blog: http://tinyurl.com/2bjgvn }

Kirim email ke