Skip to content

Commit

Permalink
Merge pull request #2515 from jhawthorn/remove_unused_helpers
Browse files Browse the repository at this point in the history
Remove unused admin helpers
  • Loading branch information
jhawthorn authored Jan 22, 2018
2 parents b253d60 + 639c657 commit 19f82fd
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 75 deletions.
1 change: 0 additions & 1 deletion backend/app/controllers/spree/admin/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module Spree
module Admin
class BaseController < Spree::BaseController
helper 'spree/admin/navigation'
helper 'spree/admin/tables'
layout '/spree/layouts/admin'

before_action :authorize_admin
Expand Down
6 changes: 0 additions & 6 deletions backend/app/helpers/spree/admin/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ def admin_layout(layout = nil)
@admin_layout = layout if layout
@admin_layout
end

private

def attribute_name_for(field_name)
field_name.tr(' ', '_').downcase
end
end
end
end
13 changes: 0 additions & 13 deletions backend/app/helpers/spree/admin/general_settings_helper.rb

This file was deleted.

9 changes: 0 additions & 9 deletions backend/app/helpers/spree/admin/inventory_settings_helper.rb

This file was deleted.

24 changes: 0 additions & 24 deletions backend/app/helpers/spree/admin/products_helper.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
module Spree
module Admin
module ProductsHelper
def taxon_options_for(product)
options = @taxons.map do |taxon|
selected = product.taxons.include?(taxon)
content_tag(:option,
value: taxon.id,
selected: ('selected' if selected)) do
(taxon.ancestors.pluck(:name) + [taxon.name]).join(" -> ")
end
end
safe_join(options)
end

def option_types_options_for(product)
@option_types.map do |option_type|
selected = product.option_types.include?(option_type)
content_tag(:option,
value: option_type.id,
selected: ('selected' if selected)) do
option_type.name
end
end
safe_join(options)
end

def show_rebuild_vat_checkbox?
Spree::TaxRate.included_in_price.exists?
end
Expand Down
13 changes: 0 additions & 13 deletions backend/app/helpers/spree/admin/tables_helper.rb

This file was deleted.

9 changes: 0 additions & 9 deletions backend/app/helpers/spree/admin/taxons_helper.rb

This file was deleted.

0 comments on commit 19f82fd

Please sign in to comment.