excellent ! Thanks for the tip.

Mike

On Oct 24, 5:31 pm, "Maurício Linhares" <[EMAIL PROTECTED]>
wrote:
> Hi Michael,
>
> The &:created_at is just a shorthand for &Proc.new { |i| i.created_at }
>
>
>
> On Fri, Oct 24, 2008 at 12:18 PM, Bensoussan Michael <[EMAIL PROTECTED]> 
> wrote:
>
> > Thanks Maurício,
>
> > On Oct 24, 5:15 pm, "Maurício Linhares" <[EMAIL PROTECTED]>
> > wrote:
> >> Even simpler:
>
> >> my_model1 = Model.find(:all)
> >> my_model2 = Model.find(:all)
>
> >> @my_models = (my_model1 + mymodel2).sort_by( &:created_at )
>
> > What the '&' do precisely ?
>
> >> On Fri, Oct 24, 2008 at 12:12 PM, Bensoussan Michael <[EMAIL PROTECTED]> 
> >> wrote:
>
> >> > Yes  that's it ! !
>
> >> > Thank you,
> >> > Mike.
>
> >> --
> >> Maurício Linhareshttp://alinhavado.wordpress.com/(pt-br) 
> >> |http://blog.codevader.com/(en)
> >> João Pessoa, PB, +55 83 8867-7208
>
> --
> Maurício Linhareshttp://alinhavado.wordpress.com/(pt-br) 
> |http://blog.codevader.com/(en)
> João Pessoa, PB, +55 83 8867-7208
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
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