Sha256: dc207b24969091e6a365d4485c8cf9d541da87cc803702de1d702c975a00d215
Contents?: true
Size: 1.31 KB
Versions: 19
Compression:
Stored size: 1.31 KB
Contents
module Tenon class WarningGenerator def self.generate new.warnings end def warnings warnings = [] warnings << "Your site needs a title<br /><a href='/tenon/settings'>OK</a><br />".html_safe if Tenon::MySettings.site_title.blank? warnings << "Your site needs an address<br /><a href='/tenon/settings'>OK</a><br />".html_safe if Tenon::MySettings.site_url.blank? warnings << "You haven't entered an email address to receive contact messages.<br /><a href='/tenon/settings'>Correct This</a><br />".html_safe if Tenon::MySettings.contact_email.blank? warnings << "You haven't entered an email address from which to send contact messages and other site notices.<br /><a href='/tenon/settings'>Correct This</a><br />".html_safe if Tenon::MySettings.from_email.blank? warnings << "You haven't entered the Google Analytics code.<br /><a href='/tenon/settings'>Correct This</a><br />".html_safe if Tenon::MySettings.google_analytics.blank? warnings << 'You have not included a custom favicon.' unless favicon && favicon.size > 0 warnings end private def favicon return @favicon if @favicon begin @favicon = File.read(File.join(Rails.root, 'public', 'favicon.ico')) rescue Errno::ENOENT @favicon = nil end end end end
Version data entries
19 entries across 19 versions & 1 rubygems