gretel 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- 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