Skip to content

clm-a/content_for_in_controllers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

content_for in controllers

Enables use of content_for in your controllers

# in your Gemfile
gem 'content_for_in_controllers'

# in a controller 
before_filter :set_title

def set_title
  content_for :page_title, "Hello !"
end

# in a view
<title><%= yield :page_title %></title>

You just can pass strings for now, and I have no precise idea how it would work in an ActionMailer view :)

Simply this gist by hiroshi Gemified

Say hello @clmntlxndr

About

Enables content_for in controllers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages