def app_instance_name
      @app_instance_name ||=
          begin
            yaml = Rails.root.join('config','instance.yml')
            if File.exist?(yaml)
              yaml = (YAML.load(ERB.new(File.read(yaml)).result) || {}).symbolize_keys
              yaml[:name].blank? ? 'default' : yaml[:name]
            else
              'default'
            end
          end
    end
def app_instance_name
      @app_instance_name ||=
          begin
            yaml = Rails.root.join('config','instance.yml')
            if File.exist?(yaml)
              yaml = (YAML.load(ERB.new(File.read(yaml)).result) || {}).symbolize_keys
              yaml[:name].blank? ? 'default' : yaml[:name]
            else
              'default'
            end
          end
    end
Gets the application instance name.

 This can be set by creating a +config/instance.yml+ configuration file and setting the 'name' property.
 The instance name is used to create unique cookies for each instance of an application.
 The default instance name is 'default'.