Sha256: 9d18924f0073352940b2647fa4dc69a094e1c0615d399b1c938daa3dea80450e

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

module <%= options.namespace.capitalize %>
  class <%= class_name.pluralize %>Controller < Fae::BaseController
<% if @attachments.present? %>
    private

    def build_assets
<% @attachments.each do |attachment| -%>
<% if attachment.type == :seo_set -%>
      if @item.<%= attachment.name %>.blank?
        @item.build_<%= attachment.name %>
        @item.<%= attachment.name %>.build_social_media_image
      end
<% else -%>
      @item.build_<%= attachment.name %> if @item.<%= attachment.name %>.blank?
<% end -%>
<% end -%>
    end
<% end %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fae-rails-3.0.0 lib/generators/fae/templates/controllers/scaffold_controller.rb