Sha256: 55bc12511951e5f195b97707d9f5ec74d50360c8857f2457e192521c868e2b70

Contents?: true

Size: 566 Bytes

Versions: 16

Compression:

Stored size: 566 Bytes

Contents

ruby:
  raise 'Form parameter is required' if form.blank?

  # You should be able to set target model to nil if you want,
  #   though it should default to the form object's class
  if !defined?(target_class)
    target_class = form.object.class.to_s
  end

  templates = PresentationDataTemplate
  templates = templates.where(target_class: target_class) if target_class

p Please select a template for this presentation data.

= form.collection_select :presentation_data_template_id, templates.asc(:title), :id, :title, {include_blank: true}, class: 'form-control'

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
biola_wcms_components-0.15.3 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.15.2 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.15.1 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.15.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.14.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.13.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.12.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.11.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.10.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.9.1 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.9.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.8.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.7.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.6.1 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.6.0 app/views/wcms_components/forms/_data_template_picker.html.slim
biola_wcms_components-0.5.0 app/views/wcms_components/forms/_data_template_picker.html.slim