rails_before_render 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f6637b53ce8426b9fbddcb7c0fe68c1b96193ce
4
- data.tar.gz: be0ca8098031ba75a51020498503187b735bd4c2
3
+ metadata.gz: 8be3c2877d34be1abbd791da92a714c0a78d008e
4
+ data.tar.gz: 0000c1ee5011566838e06b9b1fb714e4fa8b6bb1
5
5
  SHA512:
6
- metadata.gz: a01fbcdafe44b6badaa6d62d57cc023db7d7a446a71303ad5fe5cf18c6ad46b97bd87edb8b53ccd5fb227a282c324febffac0919802916d6dd47b524f0a48df0
7
- data.tar.gz: 1147d4b351bca6975d601f3e608d775f05fd7c1b75afb60344af3628694deb402d6af7256a44922a06277af76ff4ef9fc0d15c538f46214604e86970def539bc
6
+ metadata.gz: 4c7ce7557535c8ab2dd392eeccc00a98391fad5bc4e7556746c140997a19499cc934a72e802e0c64fb044ba5fb1882fcdabff9f6e462010e88f81365301baa57
7
+ data.tar.gz: 8f551dd83a66cce9f50bc248a12d68ce4fd7bb23e5b1f7cfd45c2107d0ca63ded3ec5bb3042d945873797deffa8630e6b8b325a4dfd03825ecf0cd8c6b97e7e7
data/.version CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -1,11 +1,11 @@
1
1
  module RailsBeforeRender
2
- @@before_render ||= {}
2
+ @@_before_render ||= {}
3
3
 
4
4
  def self.included base
5
- def base.before_render &block
5
+ def base.before_render_filter &block
6
6
  klass = self.to_s
7
- @@before_render[klass] ||= []
8
- @@before_render[klass].push block
7
+ @@_before_render[klass] ||= []
8
+ @@_before_render[klass].push block
9
9
  end
10
10
  end
11
11
 
@@ -17,7 +17,7 @@ module RailsBeforeRender
17
17
  @_was_in_render = true
18
18
 
19
19
  self.class.ancestors.each do |klass|
20
- filters = @@before_render[klass.to_s] || next
20
+ filters = @@_before_render[klass.to_s] || next
21
21
  filters.each do |filter|
22
22
  # do not run if render or redirect is called
23
23
  instance_exec &filter unless performed?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_before_render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Reic