Sunday, September 9, 2012

Re: [Rails] Rails Syntax Change

On Sep 9, 2012, at 12:10 PM, rails2012 wrote:

> I am a newbie. Looking at some old text vs new. I see some changes:
>
> New: <%= yield(:title) %>
> Old: <%= @title %>
>

Not sure about this one.

> New: "#{base_title} | Home"
> Old: @base_title + "| Home"

The new way creates one fewer String object, and that can only be good for performance and memory usage.

Walter

>
> Can you tell me when they got changed? Are the new syntax now the preferred way? Are they more elegant?
>
> Thanks!
>
>
> --
> 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 rubyonrails-talk+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/dsR8sPd7BgEJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate