# -*- encoding : utf-8 -*-
class CibleAlias < ActiveRecord::Base
	include Rails.application.routes.url_helpers
	belongs_to :menu_item

	
	validates :menu_item_id, :presence => true
	#has_one :link_content, :as => :cible
	has_one :cibleable, :as => :cible
	
	def cible_name
		"A changer"
	end
	
	def cible_url 
		"A changer"
	end
	
	def url
		if self.menu_item
			menu_item_path(:url => self.menu_item.permalink)
		end	
		
	end

end
