Sha256: 2ebc4899758e6d100884a9080a84d7f3cfe5fba82c51b2c1c92ba6d1d9d982c2
Contents?: true
Size: 998 Bytes
Versions: 4
Compression:
Stored size: 998 Bytes
Contents
module Rabl class Railtie < Rails::Railtie initializer "rabl.initialize" do |app| # Force Rails to load view templates even in API mode # Stolen shamelessly from jbuilder: https://github.com/rails/jbuilder/blob/master/lib/jbuilder/railtie.rb if Rails::VERSION::MAJOR >= 5 module ::ActionController module ApiRendering include ActionView::Rendering end end ActiveSupport.on_load :action_controller do if self == ActionController::API include ActionController::Helpers include ActionController::ImplicitRender end end end ActiveSupport.on_load(:action_view) do Rabl.register! # Inject dependency tracker for :rabl if Rails.version =~ /^[456]/ require 'action_view/dependency_tracker' ActionView::DependencyTracker.register_tracker :rabl, Rabl::Tracker end end end end # Railtie end # Rabl
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rabl-0.14.5 | lib/rabl/railtie.rb |
rabl-0.14.4 | lib/rabl/railtie.rb |
rabl-0.14.3 | lib/rabl/railtie.rb |
rabl-0.14.2 | lib/rabl/railtie.rb |