Sha256: df4ae520ff4d06304d697fc000c65a1cb79bf8ccf92a2171f297479942aaefd6

Contents?: true

Size: 453 Bytes

Versions: 2

Compression:

Stored size: 453 Bytes

Contents

module Vhost::ApplicationHelperExtensions
  def self.included(receiver)
    # This swaps out the 'subtitle' method for the 'site_hostname'
    # method to show the hostname in the subtitle in admin...
    receiver.send :alias_method_chain, :subtitle, :site_hostname
    
    receiver.send :define_method, :site_admin? do
      current_user and current_user.site_admin?
    end
  end
  
  def subtitle_with_site_hostname
    current_site.title
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
radiant-vhost-extension-2.3.1 lib/vhost/application_helper_extensions.rb
radiant-vhost-extension-2.3.0 lib/vhost/application_helper_extensions.rb