Sha256: 358a41aca8fb0d5b0e665e56c8e640f6c5fae6916da617837b0078cbe8c9ecf3
Contents?: true
Size: 738 Bytes
Versions: 15
Compression:
Stored size: 738 Bytes
Contents
module ModsDisplay::ControllerExtension def self.included(base) base.extend ClassMethods base.class_eval do def mods_display_config @mods_display_config || self.class.mods_display_config end if base.respond_to?(:helper_method) helper_method :mods_display_config, :render_mods_display end end end def render_mods_display model return "" if model.mods_display_xml.nil? ModsDisplay::HTML.new(mods_display_config, model.mods_display_xml, self) end private module ClassMethods def configure_mods_display &config @mods_display_config = ModsDisplay::Configuration.new &config end def mods_display_config @mods_display_config end end end
Version data entries
15 entries across 15 versions & 1 rubygems