Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused admin helpers #2515

Merged
merged 6 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.