Sha256: a9351711ec73ef2ad4027d60866eefede3ad622e75ddfd5f0e820e7c94217714

Contents?: true

Size: 352 Bytes

Versions: 2

Compression:

Stored size: 352 Bytes

Contents

require "pbbuilder/handler"

class Pbbuilder
  class Railtie < ::Rails::Railtie
    initializer :register_handler do
      ActiveSupport.on_load :action_view do
        Mime::Type.register "application/vnd.google.protobuf", :pb, [], %w(pb)
        ActionView::Template.register_template_handler :pbbuilder, PbbuilderHandler
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pbbuilder-0.12.0 lib/pbbuilder/railtie.rb
pbbuilder-0.11.0 lib/pbbuilder/railtie.rb