rabl 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.8
4
+
5
+ * Fix Rails 3 resolution on Ruby < 1.9.2
6
+
3
7
  ## 0.6.7
4
8
 
5
9
  * Fix format to default to json in the event that it is a 'hash' (Thanks @databyte)
@@ -62,9 +62,9 @@ module Rabl
62
62
  source_format = request_format if defined?(request_format)
63
63
  if source_format && context_scope.respond_to?(:lookup_context) # Rails 3
64
64
  lookup_proc = lambda { |partial|
65
- if context_scope.lookup_context.method(:find).parameters.count < 5
65
+ if ActionPack::VERSION::MAJOR == 3 && ActionPack::VERSION::MINOR < 2
66
66
  context_scope.lookup_context.find(file, [], partial)
67
- else
67
+ else # Rails 3.2 and higher
68
68
  context_scope.lookup_context.find(file, [], partial, [], {:formats => [:json]})
69
69
  end }
70
70
  template = lookup_proc.call(false) rescue lookup_proc.call(true)
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.6.7"
2
+ VERSION = "0.6.8"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rabl
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.7
5
+ version: 0.6.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nathan Esquenazi