Sha256: 653196007b1059a29ee8e3c8c9e9ae4899243a399e6ef3e3355656aeb2b8c6c3

Contents?: true

Size: 503 Bytes

Versions: 4

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

class Core::Builders::<%=  @subject_class %> < RiderKick::Builders::AbstractActiveRecordEntityBuilder
  acts_as_builder_for_entity Core::Entities::<%= @subject_class%>
<% if @uploaders.present? -%>
  def attributes_for_entity
    {
<% @uploaders.each_with_index do |upload, index| -%>
      <%= upload %>: (Rails.application.routes.url_helpers.polymorphic_url(params.<%= upload %>) rescue '')<%= ',' if index < @uploaders.size - 1 %>
<% end -%>
    }
  end
<% end -%>
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rider-kick-0.0.5 lib/generators/rider_kick/templates/domains/core/builders/builder.rb.tt
rider-kick-0.0.4 lib/generators/rider_kick/templates/domains/core/builders/builder.rb.tt
rider-kick-0.0.3 lib/generators/rider_kick/templates/domains/core/builders/builder.rb.tt
rider-kick-0.0.2 lib/generators/rider_kick/templates/domains/core/builders/builder.rb.tt