class Page

Clase para las páginas de información

Constants

ABOUT
PREDEFINED

Public Instance Methods

attachment_for(name) click to toggle source

See thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip#comment-2415

# File app/models/page.rb, line 59
def attachment_for name
  @_paperclip_attachments ||= {}
  @_paperclip_attachments[name] ||= Attachment.new(name, self, self.class.attachment_definitions[name])
end
comments() click to toggle source
# File app/models/page.rb, line 54
def comments
  []
end
debate_id() click to toggle source

Páginas que corresponden a Debate

# File app/models/page.rb, line 65
def debate_id
  self.debate.present? ? self.debate.id : nil
end
debate_id=(d_id) click to toggle source
# File app/models/page.rb, line 69
def debate_id=(d_id)
  if debate = Debate.find(d_id)
    self.debate = debate
  end
  true
end