Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Plugin for Rails to allow using of view helpers in controllers
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
README
init.rb

README

Created by Eugene Zolotarev (eugzol@gmail.com)
http://github.com/EugZol/use_helper_module

MIT license

Plugin created to make possible using view helpers in controllers.

class MyController << ApplicationController
  # all included methods are made protected to prevent running them as actions
  use_helper_module ActionView::Helpers::DateHelper

  def index
    render :text => time_ago_in_words(3.minutes.from_now) # => 3 minutes
  end
end
Something went wrong with that request. Please try again.