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.
Files changed (2) hide show
  1. data/lib/gretel/crumbs.rb +5 -2
  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
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gretel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lasse Bunk