1 2 3 4 5 6 7 8 9 10 11 12 13
class SidebarModule attr_reader :title, :body, :position def initialize(title, body, pos) @title = title @body = body @position = pos end def to_partial_path "sidebar_modules/#{self.class.to_s.underscore}" end end