Class: Searchgasm::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/searchgasm/config.rb,
lib/searchgasm/config/search.rb,
lib/searchgasm/config/helpers.rb

Overview

Config

Adds default configuration for all of searchgasm. For rails the best place to do this is in config/initializers. Create a file in there called searchgasm.rb with the following content:

Example

# config/iniitializers/searchgasm.rb
Searchgasm::Config.configure do |config|
  config.search.per_page = 25
  config.helpers.order_by_link_asc_indicator = "My indicator"
end

For a list of all configuration options see Searchgasm::Config::Search and Searchgasm::Config::Helpers

Defined Under Namespace

Classes: Helpers, Search

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Convenience method for setting configuration See example at top of class.

Yields:

  • (_self)

Yield Parameters:



18
19
20
# File 'lib/searchgasm/config.rb', line 18

def configure
  yield self
end

.helpersObject

:nodoc:



26
27
28
# File 'lib/searchgasm/config.rb', line 26

def helpers # :nodoc:
  Helpers
end

.searchObject

:nodoc:



22
23
24
# File 'lib/searchgasm/config.rb', line 22

def search # :nodoc:
  Search
end