appirits/comable

View on GitHub
backend/app/helpers/comable/admin/products_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Comable
  module Admin
    module ProductsHelper
      # プロパティ追加ボタン設置
      def add_property_button_tag(name)
        fields = render 'comable/admin/products/property_fields', property_key: nil, property_value: nil
        button_tag(name, type: :button, class: 'add_property btn btn-default pull-right', data: { fields: fields.delete("\n") })
      end
    end
  end
end