Permalink
Browse files

Remove logging and fix a bug in SimplePresenter.

  • Loading branch information...
1 parent cc9f661 commit 72d300a42fa9979be84be4fe68f7572bce3f1172 @eventualbuddha eventualbuddha committed Oct 31, 2010
View
4 lib/data_preloading.rb
@@ -39,9 +39,5 @@ def _preload_data(data, setter)
</script>
HTML
end
- rescue Object => e
- Rails.logger.warn { "!!!!!!!!! #{e}\n#{e.backtrace.join("\n")}" }
- Rails.logger.warn { "????????? data=#{data.inspect} --- setter=#{setter.inspect}" }
- raise e
end
end
View
4 vendor/plugins/simple_presenter/lib/presenters/array_presenter.rb
@@ -1,4 +1,8 @@
class ArrayPresenter < SimplePresenter
+ def as_json(options=nil)
+ presentable.map {|object| object.as_json(options) }
+ end
+
def method_missing(sym, args = nil)
return nil if presentable.empty?
super(sym, args)
View
2 vendor/plugins/simple_presenter/lib/simple_presenter.rb
@@ -10,7 +10,7 @@ def initialize(presentable, renderer)
end
def inspect
- "#<#{self.class}: presenter is a #{@presentable.class}, renderer is a #{@renderer.class}>"
+ "#<#{self.class}: presentable is a #{@presentable.class}, renderer is a #{@renderer.class}>"
end
def method_missing(sym, *args, &block)

0 comments on commit 72d300a

Please sign in to comment.