Mercurial > hg > soundsoftware-site
view .svn/pristine/c3/c3b3fde2322bc5fb3fb730ddaf39d1d7a4bf6387.svn-base @ 1080:5bd8c86cfa6a issue_540
Makes the Publication model act as an activity; overloading the default ActivitiesController#index view in the Bibliography Plugin in order to differentiate Publications from the other event types.
* Known issues:
** route to /activities is not working (only to /activity);
** publication cache needs to be implemented in the model, not in the helper;
** when a publication is added to n projects, n events are created (all with the same content).
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 22 Nov 2012 16:51:23 +0000 |
parents | cbb26bc654de |
children |
line wrap: on
line source
# == Using plugin assets for form tag helpers # # It's as easy to use plugin images for image_submit_tag using Engines as it is for image_tag: # # <%= image_submit_tag "my_face", :plugin => "my_plugin" %> # # --- # # This module enhances one of the methods from ActionView::Helpers::FormTagHelper: # # * image_submit_tag # # This method now accepts the key/value pair <tt>:plugin => "plugin_name"</tt>, # which can be used to specify the originating plugin for any assets. # module Engines::RailsExtensions::FormTagHelpers def self.included(base) base.class_eval do alias_method_chain :image_submit_tag, :engine_additions end end # Adds plugin functionality to Rails' default image_submit_tag method. def image_submit_tag_with_engine_additions(source, options={}) options.stringify_keys! if options["plugin"] source = Engines::RailsExtensions::AssetHelpers.plugin_asset_path(options["plugin"], "images", source) options.delete("plugin") end image_submit_tag_without_engine_additions(source, options) end end module ::ActionView::Helpers::FormTagHelper #:nodoc: include Engines::RailsExtensions::FormTagHelpers end