Sha256: 3ac87505f964e6d8cf97a7cc51e9377e365ec840a7464754624deff70621e56c

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 KB

Contents

module Annotator
  module InitialDescription

    # Initila descriptions for devise specific columns
    class Devise < Base

      def check
        @model.respond_to?(:devise_modules) && columns.keys.include?(@column.to_sym)
      end

      def columns
        {
          :reset_password_token       => "Devise Recoverable module",
          :reset_password_sent_at     => "Devise Recoverable module",
          :remember_created_at        => "Devise Rememberable module",
          :sign_in_count              => "Devise Trackable module",
          :current_sign_in_at         => "Devise Trackable module",
          :last_sign_in_at            => "Devise Trackable module",
          :current_sign_in_ip         => "Devise Trackable module",
          :last_sign_in_ip            => "Devise Trackable module",
          :password_salt              => "Devise Encriptable module",
          :confirmation_token         => "Devise Confirmable module",
          :confirmed_at               => "Devise Confirmable module",
          :confiramtion_sent_at       => "Devise Confirmable module",
          :unconfirmed_email          => "Devise Confirmable module",
          :failed_attempts            => "Devise Lockable module",
          :unlock_token               => "Devise Locakble module",
          :locked_at                  => "Devise Lockable module",
          :authentication_token       => "Devise Token authenticable module"
        }
      end

      def text
        columns[@column.to_sym]
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
annotator-0.0.7 lib/annotator/initial_description/devise.rb
annotator-0.0.6 lib/annotator/initial_description/devise.rb
annotator-0.0.5 lib/annotator/initial_description/devise.rb