Groups
Groups
Sign in
Groups
Groups
Ruby on Rails: Talk
Conversations
About
Send feedback
Help
Quick question about AR arrays.
16 views
Skip to first unread message
Samson Oak
unread,
Jun 30, 2014, 5:14:51 PM
6/30/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
If I have a method "bar" on a model "Foo", this should not work right?
Foo.all.bar
Should be this?
Foo.all.each {|foo| Foo.bar }
--
Posted via
http://www.ruby-forum.com/
.
Samson Oak
unread,
Jun 30, 2014, 5:15:51 PM
6/30/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Oops, I meant Foo.all.each {|foo| foo.bar } for the second one.
manoj c.
unread,
Jul 2, 2014, 2:03:53 AM
7/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Samson Oak wrote in post #1151218:
> Oops, I meant Foo.all.each {|foo| foo.bar } for the second one.
Yes, second one should work as your method is a instance method
Thanks.
Manoj Menon,
Reply all
Reply to author
Forward
0 new messages