Plugin for Rails to allow using of view helpers in controllers
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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