instance method app

Ruby on Rails 4.0.13

Since v3.2.22.5 Last seen in v7.1.6

Available in: v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6

Signature

app(create=false)

reference the global “app” instance, created on demand. To recreate the instance, pass a non-false value as the parameter.

Parameters

create opt = false
Source
# File railties/lib/rails/console/app.rb, line 8
    def app(create=false)
      @app_integration_instance = nil if create
      @app_integration_instance ||= new_session do |sess|
        sess.host! "www.example.com"
      end
    end

Defined in railties/lib/rails/console/app.rb line 8 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::ConsoleMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close