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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -