Class: Blacksand::Navigation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Blacksand::Navigation
- Defined in:
- app/models/blacksand/navigation.rb
Instance Method Summary collapse
Instance Method Details
#url_or_page_presence ⇒ Object
17 18 19 20 21 22 |
# File 'app/models/blacksand/navigation.rb', line 17 def url_or_page_presence if url.blank? && page_id.blank? errors.add(:url, "链接或者页面两个必须要填一项") errors.add(:page_id, "链接或者页面两个必须要填一项") end end |