vita_app/app/models/menu_item_link_content.rb
Nicolas Bally 1d3af87d4c initial
2016-04-28 10:07:08 +02:00

22 lines
398 B
Ruby
Executable File

class MenuItemLinkContent < ActiveRecord::Base
belongs_to :menu_item
belongs_to :image_file
has_one :portlet, :as => :content, :dependent => :destroy
belongs_to :cible, :polymorphic => true
accepts_nested_attributes_for :cible
STYLES = [["normal"], ["Bandeaux de titre"]]
def ratio
if self.proportion?
self.proportion
else
0.62
end
end
end