Module: RailsAdserver

Defined in:
lib/rails_adserver.rb,
lib/rails_adserver/config.rb,
lib/rails_adserver/engine.rb,
lib/rails_adserver/version.rb,
app/models/rails_adserver/click.rb,
app/models/rails_adserver/adspace.rb,
app/helpers/rails_adserver/pages_helper.rb,
app/models/rails_adserver/advertisement.rb,
app/helpers/rails_adserver/adspaces_helper.rb,
app/helpers/rails_adserver/application_helper.rb,
app/controllers/rails_adserver/pages_controller.rb,
app/helpers/rails_adserver/advertisements_helper.rb,
app/controllers/rails_adserver/adspaces_controller.rb,
app/uploaders/rails_adserver/advertisement_uploader.rb,
app/controllers/rails_adserver/application_controller.rb,
app/controllers/rails_adserver/advertisements_controller.rb

Defined Under Namespace

Modules: AdspacesHelper, AdvertisementsHelper, ApplicationHelper, Config, PagesHelper Classes: Adspace, AdspacesController, Advertisement, AdvertisementUploader, AdvertisementsController, ApplicationController, Click, Engine, PagesController

Constant Summary collapse

VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.config(entity = nil, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/rails_adserver.rb', line 4

def self.config(entity = nil, &block)
  if entity
    RailsAdserver::Config.model(entity, &block)
  elsif block_given? && ENV['SKIP_RAILS_ADMIN_INITIALIZER'] != "true"
    block.call(RailsAdserver::Config)
  else
    RailsAdserver::Config
  end
end