Module: Carrier
- Defined in:
- lib/carrier.rb,
lib/carrier/rails.rb,
lib/carrier/version.rb,
lib/carrier/rails/engine.rb,
lib/carrier/rails/engine.rb,
lib/carrier/configuration.rb,
lib/carrier/rails/helpers.rb,
lib/carrier/configuration/user.rb,
lib/carrier/configuration/models.rb,
lib/carrier/configuration/routes.rb
Defined Under Namespace
Modules: Rails
Classes: Configuration, Engine
Constant Summary
collapse
- VERSION =
"0.1.5"
Class Method Summary
collapse
Class Method Details
.carrier_requires ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'lib/carrier/rails/engine.rb', line 3
def self.carrier_requires
validators = Dir[File.join ::Carrier.config.root, "app/validators/**/*.rb"]
models = Dir[File.join ::Carrier.config.root, "app/models/carrier/**/*.rb"]
(validators + models).each do |rb_file|
require_dependency rb_file
end
end
|
.check_unread! ⇒ Object
29
30
31
|
# File 'lib/carrier/rails/engine.rb', line 29
def self.check_unread!
Carrier.config.check_unread!
end
|
.config {|conf| ... } ⇒ Object
Also known as:
configure
15
16
17
18
19
|
# File 'lib/carrier.rb', line 15
def config &block
conf = Carrier::Configuration.instance
yield conf if block
conf
end
|
.include_helpers ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/carrier/rails/engine.rb', line 20
def self.include_helpers
ActiveSupport.on_load(:action_controller) do
include Carrier::Rails::Helpers
end
ActiveSupport.on_load(:action_view) do
end
end
|
.models_requires ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/carrier/rails/engine.rb', line 12
def self.models_requires
app_models = Dir[File.join ::Rails.root, "app/models/**/*.rb"]
(app_models).each do |rb_file|
require_dependency rb_file
end
end
|