Module: Forge

Defined in:
lib/forge/lib/forge/config/events.rb,
lib/forge/lib/forge.rb,
lib/forge/lib/forge/reorderable.rb,
lib/forge/lib/forge/can_use_asset.rb,
lib/forge/lib/forge/config/videos.rb,
lib/forge/lib/forge/can_be_foreign.rb,
lib/forge/lib/forge/config/ecommerce.rb,
lib/forge/lib/forge/can_have_comments.rb,
lib/forge/lib/forge/credit_card_processor.rb,
lib/forge/lib/forge/shared_controller_methods/posts.rb,
lib/forge/lib/forge/shared_controller_methods/ecommerce.rb,
lib/forge/lib/generators/forge/scaffold/scaffold_generator.rb,
lib/forge/lib/generators/forge/scaffold_small/scaffold_small_generator.rb,
lib/forge/lib/generators/forge/i18n_migrations/i18n_migrations_generator.rb

Overview

File: lib/forge/ecommerce.rb Adds configuration options for ecommerce eg.

Forge.configure do |config|

config.ecommerce.payments = :hosted or :integrated
config.ecommerce.shippers = {
  :one => One,
  :two => Two
}

config.ecommerce.active_merchant = {
  :gateway  => "gateway",
  :login    => "login",
  :password => "password"
}

config.ecommerce.email_receipt = true

config.ecommerce.currency = "CAD"

config.ecommerce.paypal_production = {
  :account => {}
}

config.ecommerce.paypal_sandbox = {
  :account => {}
}

end

Defined Under Namespace

Modules: CanBeForeign, CanHaveComments, CanUseAsset, Controllers, Generators, OrdersHelper, Reorderable, TreeHelper, VideoFeedsHelper Classes: AssetsController, BannersController, CommentsController, Configuration, CountriesController, CreditCardProcessor, DispatchClicksController, DispatchesController, EventsController, GalleriesController, HelpTopicsController, IndexController, OrdersController, PagesController, PostCategoriesController, PostsController, ProductCategoriesController, ProductsController, SalesController, SettingsController, SubscriberGroupsController, SubscribersController, TaxRatesController, UsersController, VideoFeedsController, VideosController

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



3
4
5
# File 'lib/forge/lib/forge.rb', line 3

def config
  @config
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



6
7
8
9
# File 'lib/forge/lib/forge.rb', line 6

def self.configure
  self.config ||= Configuration.new
  yield config
end