railings 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/railings.rb CHANGED
@@ -2,6 +2,7 @@ module Railings
2
2
  autoload :Domains, 'railings/domains'
3
3
  autoload :Filterable, 'railings/filterable'
4
4
  autoload :LayoutHelper, 'railings/layout_helper'
5
+ autoload :Modules, 'railings/modules'
5
6
  autoload :RoutingHelper, 'railings/routing_helper'
6
7
 
7
8
  class Railtie < Rails::Railtie
@@ -12,8 +13,9 @@ module Railings
12
13
  ApplicationController.send :helper, LayoutHelper
13
14
  end
14
15
 
15
- initializer 'railings.setup_routing_domains' do
16
+ initializer 'railings.setup_routing' do
16
17
  Rails::application::class::parent.const_set 'Domains', Domains
18
+ Rails::application::class::parent.const_set 'Modules', Modules
17
19
  end
18
20
  end
19
21
  end
@@ -0,0 +1,8 @@
1
+ module Railings
2
+ module Modules
3
+ def self.const_missing name
4
+ { :constraints => Railings::Domains.const_get(name),
5
+ :module => name.to_s.downcase }
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Railings
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathaniel Jones
@@ -84,6 +84,7 @@ files:
84
84
  - lib/railings/extensions/string.rb
85
85
  - lib/railings/filterable.rb
86
86
  - lib/railings/layout_helper.rb
87
+ - lib/railings/modules.rb
87
88
  - lib/railings/routing_helper.rb
88
89
  - lib/railings/version.rb
89
90
  - railings.gemspec