Class: Cms::FormEntriesController::FauxContentType
- Inherits:
-
ContentType
- Object
- ContentType
- Cms::FormEntriesController::FauxContentType
- Defined in:
- app/controllers/cms/form_entries_controller.rb
Overview
Allows Entries to be displayed using same view as Content Blocks.
Constant Summary
Constants inherited from ContentType
ContentType::DEFAULT_CONTENT_TYPE_NAME
Instance Attribute Summary
Attributes inherited from ContentType
Instance Method Summary collapse
- #columns_for_index ⇒ Object
- #display_name ⇒ Object
- #display_name_plural ⇒ Object
-
#initialize(form) ⇒ FauxContentType
constructor
A new instance of FauxContentType.
Methods inherited from ContentType
addressable, available, available_by_module, connectable, #connectable?, #content_block_type, #content_block_type_for_list, create!, default, find_by_key, #form, list, #model_class, #module_name, named, #orderable_attributes, other_connectables, #param_key, #readonly?, #save!, user_generated_connectables
Constructor Details
#initialize(form) ⇒ FauxContentType
Returns a new instance of FauxContentType.
115 116 117 118 |
# File 'app/controllers/cms/form_entries_controller.rb', line 115 def initialize(form) @form = form self.name = 'Cms::FormEntry' end |
Instance Method Details
#columns_for_index ⇒ Object
127 128 129 130 131 132 |
# File 'app/controllers/cms/form_entries_controller.rb', line 127 def columns_for_index cols = @form.fields.collect do |field| {:label => field.label, :method => field.name} end cols end |
#display_name ⇒ Object
120 121 122 |
# File 'app/controllers/cms/form_entries_controller.rb', line 120 def display_name 'Entry' end |
#display_name_plural ⇒ Object
124 125 126 |
# File 'app/controllers/cms/form_entries_controller.rb', line 124 def display_name_plural "Entries for #{@form.name} form" end |