Sha256: 8a21055a970b5ca30ac5c674c109a143908ff8cf7519606f1f5a9ab159445102
Contents?: true
Size: 794 Bytes
Versions: 4
Compression:
Stored size: 794 Bytes
Contents
module Lockdown module Frameworks module Merb module View def self.included(base) base.send :alias_method, :link_to_open, :link_to base.send :alias_method, :link_to, :link_to_secured end def link_to_secured(name, url = '', options = {}) if authorized? url return link_to_open(name, url, options) end return "" end def link_to_or_show(name, url = '', options = {}) lnk = link_to(name, url , options) lnk.length == 0 ? name : lnk end def links(*lis) rvalue = [] lis.each{|link| rvalue << link if link.length > 0 } rvalue.join(" | ") end end # View end # Merb end # Frameworks end # Lockdown
Version data entries
4 entries across 4 versions & 1 rubygems