Class: BlueberryCMS::LinkDecorator
- Inherits:
-
BaseDecorator
- Object
- BaseDecorator
- BlueberryCMS::LinkDecorator
- Defined in:
- app/decorators/blueberry_cms/link_decorator.rb
Instance Method Summary collapse
Instance Method Details
#link_background ⇒ Object
3 4 5 |
# File 'app/decorators/blueberry_cms/link_decorator.rb', line 3 def link_background "background-image: url(#{image.url(:content)})" if image? end |
#link_title ⇒ Object
11 12 13 |
# File 'app/decorators/blueberry_cms/link_decorator.rb', line 11 def link_title page ? page.name : title end |
#link_url ⇒ Object
7 8 9 |
# File 'app/decorators/blueberry_cms/link_decorator.rb', line 7 def link_url page ? page.to_path : url end |