Using erb inside erb at Ruby on Rails -
using modified version of http://railscasts.com/episodes/30-pretty-page-title easier page heading , title.
every page gets <% title "insert heading here" %>
. via helper
def title(page_title) content_for(:title) { page_title } end
i can use page title , headings of single pages.
also want modify view of devise setup, got stuck @ user edit page. standard heading <h2>edit <%= resource_name.to_s.humanize %> </h2>
.
tried obvious
<% title "edit <%= resource_name.to_s.humanize %>" %>
but dont work.
any idea or suggestions? in advance dennym
how
<% title "edit #{resource_name.to_s.humanize}" %>?
when using double quotes can parse ruby inside #{} blocks inside of string. won't work when using string single quotes (') double (").
Comments
Post a Comment