Sha256: f6fb0a2dc955541df13543b23762e558e0e3c7dfd564431a529441f87c7563f7
Contents?: true
Size: 623 Bytes
Versions: 1
Compression:
Stored size: 623 Bytes
Contents
module SimplePresenter class Railtie < Rails::Railtie config.simple_presenter = ActiveSupport::OrderedOptions.new end class Base delegate :translate, :t, :localize, :l, :to => :helpers def self.routes_module @routes_module ||= Module.new do include Rails.application.routes.url_helpers include UrlMethods end end def self.routes @routes ||= Object.new.extend(routes_module) end def routes self.class.routes end alias_method :r, :routes def helpers ApplicationController.helpers end alias_method :h, :helpers end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_presenter-0.2.3 | lib/simple_presenter/rails.rb |