Sha256: f9905e81ee17bb842a78b966ee5ed5b098211eacbe3447624c88a723d093c6de

Contents?: true

Size: 1.28 KB

Versions: 1

Compression:

Stored size: 1.28 KB

Contents

module Rostra
  module Config
    # Helper method used to access current user in the view
    mattr_accessor :deliver_emails_from
    @@deliver_emails_from = 'change_me@example.com'

    # Helper method used to access current user in the view
    mattr_accessor :rostra_user
    @@rostra_user = :current_user

    # Method called on the rostra'd model (e.g. User) to access the users full name
    mattr_accessor :rostra_user_name
    @@rostra_user_name = :name

    # Method called on the rostra'd model (e.g. User) to access the users email
    mattr_accessor :rostra_user_email
    @@rostra_user_email = :email

    # Method called on the rostra'd model (e.g. User) to access the users avatar. It looks
    # for an avatar in this order:
    #
    #   1. Calls the method defined here
    #   2. Uses the users email address to looks for a gravatar
    #   3. Renders <tt>app/assets/images/rostra/anonymous_avatar.png</tt>
    #
    mattr_accessor :rostra_user_avatar
    @@rostra_user_avatar = :avatar

    # Route to your login page
    mattr_accessor :main_app_login_path
    @@main_app_login_path = :new_user_session_path

    # Route to your signup page
    mattr_accessor :main_app_signup_path
    @@main_app_signup_path = :new_user_registration_path

    def self.setup
      yield self
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rostra-0.0.9 lib/rostra/config.rb