Module: Rails

Defined in:
lib/generators/templates/initializer.rb

Class Method Summary collapse

Class Method Details

.app_nameObject



13
14
15
# File 'lib/generators/templates/initializer.rb', line 13

def app_name
  @_app_name ||= ActiveSupport::StringInquirer.new(APP_NAME || 'gamestore')
end

.databaseObject



9
10
11
# File 'lib/generators/templates/initializer.rb', line 9

def database
  @_database ||= ActiveSupport::StringInquirer.new(Rails.configuration.database_configuration[Rails.env]["adapter"])
end

.host_ipObject



17
18
19
# File 'lib/generators/templates/initializer.rb', line 17

def host_ip
  @_host_ip ||= host_ip = Rails.env.development? ? "127.0.0.1" : Socket.getaddrinfo(Socket.gethostname, "www", Socket::AF_INET).first[3]
end