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
48 49 50 |
# File 'app/models/effective/permalink.rb', line 48 def redirect_path "/link/#{slug}" end |
#target ⇒ Object
52 53 54 |
# File 'app/models/effective/permalink.rb', line 52 def target url.present? ? :url : :attachment end |
#to_s ⇒ Object
44 45 46 |
# File 'app/models/effective/permalink.rb', line 44 def to_s title.presence || model_name.human end |