gretel 1.0.3 → 1.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/gretel/crumbs.rb +5 -2
- metadata +3 -3
data/lib/gretel/crumbs.rb
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
module Gretel
|
|
2
2
|
class Crumbs
|
|
3
3
|
class << self
|
|
4
|
-
include Rails.application.routes.url_helpers
|
|
5
|
-
include ActionView::Helpers::UrlHelper
|
|
6
4
|
def controller # hack because Rails.application.routes.url_helpers needs a controller method
|
|
7
5
|
end
|
|
6
|
+
|
|
8
7
|
def layout(&block)
|
|
8
|
+
# needs to be done here because Rails.application isn't set when this file is required
|
|
9
|
+
self.class.send :include, Rails.application.routes.url_helpers
|
|
10
|
+
self.class.send :include, ActionView::Helpers::UrlHelper
|
|
11
|
+
|
|
9
12
|
instance_eval &block
|
|
10
13
|
end
|
|
11
14
|
|
metadata
CHANGED