Sha256: 76c2888a59276f48374e85ce0707aec88a7ee0d76d14bd5dd3c9b5db569002d7

Contents?: true

Size: 408 Bytes

Versions: 8

Compression:

Stored size: 408 Bytes

Contents

require 'motorhead/engine'

module <%= camelized %>
  class Engine < ::Rails::Engine
    include Motorhead::Engine

    active_if { raise Motorhead::ActiveIfNotConfigured, <<-MSG }
Please configure appropriate access control for <%= camelized %> Engine.

e.g.
1) accessible for the admin users only:
    active_if { current_user.admin? }

2) always enabled for everyone:
    active_if { true }
MSG
  end
end

Version data entries

8 entries across 7 versions & 1 rubygems

Version Path
motorhead-0.5.0 lib/generators/motorhead/templates/lib/%namespaced_name%/engine.rb
motorhead-0.5.0 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.4.1 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.4.0 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.3.9 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.3.8 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.3.7 lib/generators/motorhead/templates/lib/%name%/engine.rb
motorhead-0.3.6 lib/generators/motorhead/templates/lib/%name%/engine.rb