Module: Appraise

Defined in:
lib/appraise.rb,
lib/appraise/engine.rb,
lib/generators/appraise/install_generator.rb

Defined Under Namespace

Modules: ClassMethods, Generators, InstanceMethods Classes: Engine

Constant Summary

@@max_value =
5
@@current_user_method =
nil
@@public_index =
false
@@manager_attribute_filter =
nil
@@allow_update_own_vote =
true
@@default_dimension =
:general
@@allow_guest_votes =
false

Class Method Summary (collapse)

Class Method Details

+ (Object) configure {|_self| ... }

Use this method to configure your options.

Example

Appraise.configure do |config|
  config.allow_guest_votes = true
end

Or also it's possible to configure directly in your application.rb like:

config.appraise.allow_guest_votes = true

For convenience, it's better to use an initializer with the specific configuration for Appraise, the appraise:install gnerator creates this initializer.

Yields:

  • (_self)

Yield Parameters:

  • _self (Appraise)

    the object that the method was called on



57
58
59
# File 'lib/appraise.rb', line 57

def self.configure
  yield self
end