Thanks Conrad, that helps.
I'll use 3.1rc for the production app I'm about to start
Cheers!
Terry
On Jul 5, 9:55 pm, Conrad Taylor wrote:
> Sent from my iPad
>
> On Jul 5, 2011, at 2:40 AM, itsterry wrote:
>
> > Just a quickie...
>
> > I'm seein
Just a quickie...
I'm seeing Rails 3.2 Beta already on Github, though 3.1 is still at
RC4. Is the plan still to release 3.1 or are we skipping straight to
3.2?
Forgive me if it's a dumb question: it's asked honestly.
--
You received this message because you are subscribed to the Google Groups "
Of course, as I just discovered, if I'd put in
has_many :moods, :through=>:mymoods
that would have worked too :)
On Dec 2, 9:36 am, itsterry wrote:
> Thanks, Ray. Per your suggestion, this fixed it:
>
> def moods
> ms=Mymood.where('user_id=?
n array of records, but is
> just a query.
>
> my_moods = MyMood.where("my criteria")
>
> my_moods.collect Error
>
> then my_moods.all.collect and you're good to go.
>
> or my_moods = MyMood.where("my criteria").all
> and my_moods.collec
I have three models:
(1) Mood
(2) User
(3) Mymood
Mymood belongs_to mood
Mymood belongs_to user
User has_many mymoods
I have a function in User, like this:
def moods
if mymoods.empty?
[]
else
mymoods.collect{|mm| mm.mood}
end
end
In Rails2, User.first.moods returns an array of
5 matches
Mail list logo