Class: Rails::Application

Inherits:
Engine
  • Object
show all
Defined in:
lib/rails-api/application.rb,
lib/rails-api/application/default_rails_four_middleware_stack.rb

Defined Under Namespace

Classes: DefaultRailsFourMiddlewareStack

Instance Method Summary collapse

Instance Method Details

#default_middleware_stackObject


9
10
11
12
13
14
15
# File 'lib/rails-api/application.rb', line 9

def default_middleware_stack
  if Rails::API.rails3?
    rails3_stack
  else
    DefaultRailsFourMiddlewareStack.new(self, config, paths).build_stack
  end
end

#rails_default_middleware_stackObject


7
# File 'lib/rails-api/application.rb', line 7

alias_method :rails_default_middleware_stack, :default_middleware_stack

#setup_generators!Object


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/rails-api/application.rb', line 17

def setup_generators!
  generators = config.generators

  generators.templates.unshift File::expand_path('../templates', __FILE__)
  generators.resource_route = :api_resource_route

  generators.hide_namespace "css"

  generators.rails({
    :helper => false,
    :assets => false,
    :stylesheets => false,
    :stylesheet_engine => nil,
    :template_engine => nil
  })
end