File tree Expand file tree Collapse file tree 3 files changed +2
-14
lines changed
Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -240,8 +240,6 @@ gon.rabl :as => 'alias'
240240
241241Use gon with [Jbuilder](https://github.com/rails/jbuilder) as with [Rabl](https://guthub.com/nesquena/rabl):
242242
243- Jbuilder works now only on Ruby 1.9+, so Gon support for Jbuilder works on 1.9+ only
244-
245243 0. Add jbuilder to your Gemfile (because of it depends on
246244 ActiveSuppurt ' ~ > 3.0 .0 ' )
247245
Original file line number Diff line number Diff line change 1- if RUBY_VERSION > '1.9' && defined? ( Jbuilder )
1+ if defined? ( Jbuilder )
22 gem 'blankslate'
33end
44require 'action_view'
88if defined? ( Rabl )
99 require 'gon/rabl'
1010end
11- if RUBY_VERSION > '1.9' && defined? ( Jbuilder )
11+ if defined? ( Jbuilder )
1212 require 'gon/jbuilder'
1313end
1414
@@ -88,7 +88,6 @@ def set_variable(name, value)
8888 alias_method :orig_jbuilder , :jbuilder
8989
9090 def jbuilder ( *options )
91- raise NoMethodError . new ( 'You can use Jbuilder support only in 1.9+' ) if RUBY_VERSION < '1.9'
9291 orig_jbuilder ( *options )
9392 end
9493
Original file line number Diff line number Diff line change 136136
137137 end
138138
139- if RUBY_VERSION > '1.9'
140139 require 'jbuilder'
141140 require 'gon/jbuilder'
142141
164163
165164 end
166165
167- it 'should throw error if you use gon.jbuilder with ruby < 1.9+' do
168- RUBY_VERSION = '1.8.7'
169-
170- expect { Gon . jbuilder 'some_path' } . to raise_error ( NoMethodError , /1.9/ )
171- end
172-
173166 it 'should raise error if you use gon.jbuilder without requiring jbuilder gem' do
174- RUBY_VERSION = '1.9.2'
175167 Gon . send ( :remove_const , :Jbuilder )
176168
177169 expect { Gon . jbuilder 'some_path' } . to raise_error ( NoMethodError , /Gemfile/ )
214206 end
215207 end
216208
217- end
218209
219210 def request
220211 @request ||= double 'request' , :env => { }
You can’t perform that action at this time.
0 commit comments