mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Auto correct Rubocop's Layout/EmptyLinesAroundAccessModifier cop
This commit is contained in:
@@ -107,6 +107,7 @@ module Admin
|
||||
|
||||
|
||||
protected
|
||||
|
||||
def collection
|
||||
return Enterprise.where("1=0") unless json_request?
|
||||
ocs = if params[:as] == "distributor"
|
||||
@@ -130,6 +131,7 @@ module Admin
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_data_for_index
|
||||
if json_request?
|
||||
# Split ransack params into all those that currently exist and new ones to limit returned ocs to recent or undated
|
||||
|
||||
@@ -44,6 +44,7 @@ module Spree
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_hubs
|
||||
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by!{ |d| [(@shipping_method.has_distributor? d) ? 0 : 1, d.name] }
|
||||
end
|
||||
|
||||
@@ -36,6 +36,7 @@ class AngularFormBuilder < ActionView::Helpers::FormBuilder
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def angular_name(method)
|
||||
"#{@object_name}[#{@fields_for_record_name}_attributes][{{ $index }}][#{method}]"
|
||||
end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
$COP=$1
|
||||
set -e
|
||||
|
||||
COP="$1"
|
||||
|
||||
bundle exec rubocop -a --only "$COP"
|
||||
git add -A
|
||||
|
||||
@@ -14,6 +14,7 @@ module Spree
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def make_variant_stub(product_price, variant_price)
|
||||
product = double(:product, price: product_price)
|
||||
variant = double(:variant, product: product, price: variant_price)
|
||||
|
||||
@@ -199,6 +199,7 @@ module WebHelper
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def wait_for_ajax
|
||||
wait_until { page.evaluate_script("$.active") == 0 }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user