abritium_app/app/models/menu_item_link_content.rb
Nicolas Bally a92bd4db72 initial
2019-05-08 11:30:56 +02:00

22 lines
418 B
Ruby

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"], ["combat du mois"], ["Bandeaux de titre"]]
def ratio
if self.proportion?
self.proportion
else
0.62
end
end
end