Class: Tramway::Landing::Block
- Inherits:
-
ApplicationRecord
- Object
- Core::ApplicationRecord
- ApplicationRecord
- Tramway::Landing::Block
- Defined in:
- app/models/tramway/landing/block.rb
Instance Method Summary collapse
Instance Method Details
#footer? ⇒ Boolean
45 46 47 |
# File 'app/models/tramway/landing/block.rb', line 45 def block_type. end |
#form_to_render ⇒ Object
49 50 51 52 53 54 |
# File 'app/models/tramway/landing/block.rb', line 49 def form_to_render case values['form_url'] when '/auth/sign_up' "#{Tramway::Auth.authenticable_models.first}SignUpForm".constantize end end |
#header? ⇒ Boolean
41 42 43 |
# File 'app/models/tramway/landing/block.rb', line 41 def header? block_type.in? %w[header header_with_form] end |
#link_object ⇒ Object
37 38 39 |
# File 'app/models/tramway/landing/block.rb', line 37 def link_object link_object_type.constantize.find link_object_id end |