Class PagePartial
In: app/models/page_partial.rb
Parent: DynamicView

Methods

Public Class methods

[Source]

    # File app/models/page_partial.rb, line 11
11:   def self.display_name(file_name)
12:     name, format, handler = file_name.split('.')
13:     "#{name.sub(/^_/,'').titleize} (#{format}/#{handler})"
14:   end

Public Instance methods

[Source]

   # File app/models/page_partial.rb, line 7
7:   def file_path
8:     File.join(self.class.base_path, "partials", file_name)
9:   end

[Source]

    # File app/models/page_partial.rb, line 16
16:   def prepend_underscore
17:     if !name.blank? && name[0,1] != '_'
18:       self.name = "_#{name}"
19:     end
20:   end

[Validate]