Nicolas Bally d4484275e8 initial
2011-06-25 12:08:06 +02:00

25 lines
384 B
Ruby

# -*- encoding : utf-8 -*-
class LinkContent < ActiveRecord::Base
belongs_to :item
belongs_to :cible, :polymorphic => true
has_one :portlet, :as => :content, :dependent => :destroy
validates :name, :presence => true
accepts_nested_attributes_for :cible
def url
if self.cible
cible.url
else
""
end
end
STYLES = [["Style 1",1], ["Style 2",2]]
end