Method: ModelInfo::ModelsHelper#model_download_actions
- Defined in:
- app/helpers/model_info/models_helper.rb
#model_download_actions ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/helpers/model_info/models_helper.rb', line 27 def model_download_actions if @model_class.constantize.any? content_tag :div, class: 'model_downloads' do capture do concat 'Download: ' concat link_to 'CSV', download_csv_path(model_class: @model_class), format: :csv concat ' ' concat link_to 'JSON', download_json_path(model_class: @model_class), format: :json end end end end |