Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fixes #37] Don't load template source from file

This resolves an issue whereby RSpec was intentionally
not loading the template source unless you called
render_views. The force load of templates from source
was introduced in Issue #35.
  • Loading branch information...
commit e7be8bea95ea12603d7b9581330020b2589a683d 1 parent 6bc3dcd
@databyte databyte authored
Showing with 6 additions and 7 deletions.
  1. +5 −1
  2. +1 −6 lib/rabl/template.rb
@@ -1,8 +1,12 @@
+## 0.6.14 (unreleased)
+ * Fix RSpec under Rails 3, use render_views to test output (Thanks @agibralter)
## 0.6.13
- * Small tweak to is_collection detection (look for each and map)
+ * Small tweak to is_collection detection (look for each and map)
* Adds `include_child_root` configuration option (Thanks @yoon)
## 0.6.12
7 lib/rabl/template.rb
@@ -45,16 +45,11 @@ def compile(template) %{
module ActionView
module Template::Handlers
class Rabl
class_attribute :default_format
self.default_format = Mime::JSON
- source = if template.source.empty?
- else # use source
- template.source
- end
+ source = template.source
render(self, assigns.merge(local_assigns)) }

7 comments on commit e7be8be


Thank you! :)


@databyte Should I push out 0.6.14 for this one fix?


Not required unless you have something else in the hopper.

My guess is that there's going to be several failing specs after this one because you need to specify render_views to test output again. It may warrant a minor point release (i.e. 0.7.0) with a note at the top of the README for a month or two.


Good point, we can release the next version as 0.7.0 in a bit then after fixing a few other issues. Need to take a look at some of the other issues / bugs this weekend.


Sounds good, I'll take a look myself on Sunday. Meet you in IRC if needed. :smirk:


This change tripped me up - adding a note on the README would be a good idea. I read the .14 changelog but didn't realise the implications immediately.


Sure thing - I wanted to and forgot.

Please sign in to comment.
Something went wrong with that request. Please try again.