Ruby on Rails
Tuesday, April 24, 2012
Where can I find more information about the new syntax on these:
<%- model_class = @product.class -%>
<h1><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
:default => "New #{model_class.model_name.human}") %></h1>
<%= render :partial => 'form' %>
I've been using rails for a little bit and the "model_class = ..." is all new to me, plus I can't make sense of this:
<%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}") %>
Thanks!
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eGAp5qbZVWYJ.
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment