Method: Pageflow::FileType#initialize
- Defined in:
- lib/pageflow/file_type.rb
#initialize(options) ⇒ FileType
Create file type to be returned in PageType#file_types.
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/pageflow/file_type.rb', line 87 def initialize() @model_string_or_reference = .fetch(:model) @partial = [:partial] @editor_partial = [:editor_partial] @collection_name_or_blank = [:collection_name] @nested_file_types = .fetch(:nested_file_types, []) @top_level_type = .fetch(:top_level_type, false) @css_background_image_urls = [:css_background_image_urls] @css_background_image_class_prefix = [:css_background_image_class_prefix] @url_templates = .fetch(:url_templates, -> { {} }) @custom_attributes = convert_custom_attributes_option([:custom_attributes]) end |