You can only access column attributes this way not, associations.

http://railsapi.com/doc/rails-v2.3.2.1/classes/ActiveRecord/Base.html#M001055

Cheers,
Nicholas

On Jun 19, 9:26 am, Sandip Ransing <[email protected]> wrote:
> Hello Friends !
> from my script/console
> I am getting channel blog feature as below>>Channel.find(:first).blog
>
> => #<Blog id: 1, activated_at: nil, state: true, channel_id: 1, feature_id:
> 1, created_at: "2009-05-18 13:00:51", updated_at: "2009-05-18 13:00:51">
>
> but i wanted to do something like
>
> >>Channel.find(:first)["blog"]
>
> => nil
> and it should return blog object, but it is not the case...
> anyone have any idea on this ????
>
> Thanks ,
>
> Sandip R~
>
> --
> Ruby on Rails 
> Developerhttp://sandip.sosblog.comhttp://funonrails.wordpress.comwww.joshsoftware.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to