Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Somehow my render_plugin_views fix was lost in the Ether.
From my original commit: Fixed the render_plugin_views helper to correctly render plugin hooks on Merb edge. Unfortunately we have to perform a fairly large assumption here, that is, we have to assume that you'd like to use the Object being passed (with :with =>) inside the partial as the singular, downcased version. e.g., you use <%= render_plugin_views "last_article_in_list", :with => {:last => @articles.last} %>. In your plugin hook partial, you *have* to use the singular downcased representation of the Object(s) you're passing. Articles => article 11:48 < fujin> e.g. the view I'm testing uses 'article.something', because it's expecting an Articles to be passed in /as/ 'article' 11:51 < fujin> very hard assumption to make - I either have to *blanket* say that we'll be passing a singular downcased version of the Object you're passing to :with 11:51 < fujin> or work out something else to do 11:52 < TheWordNerd> Doesn't seem like a bad assumption. 11:53 < fujin> output << partial(template_location, { :with => options[:with], :as => options[:with].class.to_s.downcase.singular })
- Loading branch information