Permalink
Browse files

trying to send the right block

  • Loading branch information...
1 parent 951dc6f commit 04012ccbb20f5a3a4ddeb18e74fbccec5f5b7ea5 @jgwmaxwell jgwmaxwell committed Apr 6, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/refinery/page_images/engine.rb
@@ -30,7 +30,9 @@ def self.register(tab)
end
config.after_initialize do
-
+
+ block = proc{ |tab| register tab }
+
Refinery::PageImages.mountings.each do |mountable|
registerable = ""
case mountable.split(":").size
@@ -39,9 +41,7 @@ def self.register(tab)
when 2
registerable = mountable
end
- registerable.constantize.send(:register) do |tab|
- register tab
- end
+ registerable.constantize.send(:register, &block)
end
Refinery.register_engine(Refinery::PageImages)

0 comments on commit 04012cc

Please sign in to comment.