Class: Effective::Permalink
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Effective::Permalink
- Includes:
- PgSearch::Model
- Defined in:
- app/models/effective/permalink.rb
Instance Method Summary collapse
Instance Method Details
#redirect_path ⇒ Object
49 50 51 |
# File 'app/models/effective/permalink.rb', line 49 def redirect_path "/link/#{slug}" end |
#target ⇒ Object
53 54 55 |
# File 'app/models/effective/permalink.rb', line 53 def target url.present? ? :url : :attachment end |
#to_s ⇒ Object
45 46 47 |
# File 'app/models/effective/permalink.rb', line 45 def to_s title.presence || model_name.human end |