Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def show
end

def update
@category.update_attributes!(params[:category])
@category.update!(params[:category])
respond_with category: @category
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@product_rule.update_attributes!(params[:product_rule])
@product_rule.update!(params[:product_rule])
respond_with product_rule: @product_rule
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def show
end

def update
@asset.update_attributes!(params[:asset])
@asset.update!(params[:asset])
respond_with asset: @asset
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def show
end

def update
@content.update_attributes!(params[:content])
@content.update!(params[:content])
respond_with content: @content
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def show
end

def update
@discount.update_attributes!(params[:discount])
@discount.update!(params[:discount])
respond_with discount: @discount
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@fulfillment_sku.update_attributes!(params[:fulfillment_sku])
@fulfillment_sku.update!(params[:fulfillment_sku])
respond_with fulfillment_sku: @fulfillment_sku
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@inventory_sku.update_attributes!(params[:inventory_sku])
@inventory_sku.update!(params[:inventory_sku])
respond_with inventory_sku: @inventory_sku
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@navigation_menu.update_attributes!(params[:navigation_menu])
@navigation_menu.update!(params[:navigation_menu])
respond_with navigation_menu: @navigation_menu
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@navigation_taxon.update_attributes!(params[:navigation_taxon])
@navigation_taxon.update!(params[:navigation_taxon])
respond_with navigation_taxon: @navigation_taxon
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@page.update_attributes!(params[:page])
@page.update!(params[:page])
respond_with page: @page
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@payment_profile.update_attributes!(params[:payment_profile])
@payment_profile.update!(params[:payment_profile])
respond_with payment_profile: @payment_profile
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@price.update_attributes!(params[:price])
@price.update!(params[:price])
respond_with price: @price
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@pricing_sku.update_attributes!(params[:pricing_sku])
@pricing_sku.update!(params[:pricing_sku])
respond_with pricing_sku: @pricing_sku
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@image.update_attributes!(params[:image])
@image.update!(params[:image])
respond_with image: @image
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@product.update_attributes!(params[:product])
@product.update!(params[:product])
respond_with product: @product
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@promo_code_list.update_attributes!(params[:promo_code_list])
@promo_code_list.update!(params[:promo_code_list])
respond_with promo_code_list: @promo_code_list
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def show
end

def update
@recommendation_settings.update_attributes!(params[:recommendation_settings])
@recommendation_settings.update!(params[:recommendation_settings])
respond_with recommendation_settings: @recommendation_settings
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@redirect.update_attributes!(params[:redirect])
@redirect.update!(params[:redirect])
respond_with redirect: @redirect
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def show
end

def update
@release.update_attributes!(params[:release])
@release.update!(params[:release])
respond_with release: @release
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@saved_address.update_attributes!(params[:saved_address])
@saved_address.update!(params[:saved_address])
respond_with saved_address: @saved_address
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def show
end

def update
@saved_credit_card.update_attributes!(params[:saved_credit_card])
@saved_credit_card.update!(params[:saved_credit_card])
respond_with saved_credit_card: @saved_credit_card
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@rate.update_attributes!(params[:rate])
@rate.update!(params[:rate])
respond_with rate: @rate
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def show
end

def update
@shipping_service.update_attributes!(params[:shipping_service])
@shipping_service.update!(params[:shipping_service])
respond_with shipping_service: @shipping_service
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
end

def update
@shipping_sku.update_attributes!(params[:shipping_sku])
@shipping_sku.update!(params[:shipping_sku])
respond_with shipping_sku: @shipping_sku
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def show
end

def update
@tax_category.update_attributes!(params[:tax_category])
@tax_category.update!(params[:tax_category])
respond_with tax_category: @tax_category
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def show
end

def update
@tax_rate.update_attributes!(params[:rate])
@tax_rate.update!(params[:rate])
respond_with rate: @tax_rate
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def show
end

def update
@user.update_attributes!(params[:user])
@user.update!(params[:user])
respond_with user: api_attributes_for(@user)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create
end

def update
@variant.update_attributes!(params[:variant])
@variant.update!(params[:variant])
respond_with variant: @variant
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_and_document_show_by_email
signup = create_email_signup(email: 'test@workarea.com')

record_request do
get admin_api.email_signup_path(URI.escape(signup.email, '+@.'))
get admin_api.email_signup_path(CGI.escape(signup.email))
assert_equal(200, response.status)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_and_document_show_by_email
user = create_user(email: 'test@workarea.com')

record_request do
get admin_api.user_path(URI.escape(user.email, '+@.'))
get admin_api.user_path(CGI.escape(user.email))
assert_equal(200, response.status)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_shows_email_signups
result = JSON.parse(response.body)['email_signup']
assert_equal(email_signup, Email::Signup.new(result))

get admin_api.email_signup_path(URI.escape(email_signup.email, '+@.'))
get admin_api.email_signup_path(CGI.escape(email_signup.email))
result = JSON.parse(response.body)['email_signup']
assert_equal(email_signup, Email::Signup.new(result))
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_shows_users
assert(result['password_digest'].blank?)
assert_equal(user, User.new(result))

get admin_api.user_path(URI.escape(user.email, '+@.'))
get admin_api.user_path(CGI.escape(user.email))
result = JSON.parse(response.body)['user']
assert(result['password_digest'].blank?)
assert_equal(user, User.new(result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def create
end

def update
current_user.update_attributes!(user_params)
current_user.update!(user_params)
render :show
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create
def update
@address = current_user.addresses.find(params[:id])

@address.update_attributes!(address_params)
@address.update!(address_params)
render :show
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def create
def update
@credit_card = @payment_profile.credit_cards.find(params[:id])

@credit_card.update_attributes!(card_params)
@credit_card.update!(card_params)
render :show
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_expiring_auth_tokens_when_a_password_changes

assert(response.ok?)

@user.update_attributes!(password: 'a_different_password')
@user.update!(password: 'a_different_password')

get storefront_api.account_path,
headers: { 'HTTP_AUTHORIZATION' => encode_credentials(token) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_create_with_limited_inventory
end

def test_create_with_inactive_sku
@product.variants.first.update_attributes!(active: false)
@product.variants.first.update!(active: false)

post storefront_api.cart_items_path(@order),
params: {
Expand All @@ -80,7 +80,7 @@ def test_create_with_inactive_sku
end

def test_create_with_customizations
@product.update_attributes(customizations: 'foo_cust')
@product.update(customizations: 'foo_cust')

post storefront_api.cart_items_path(@order),
params: {
Expand All @@ -100,7 +100,7 @@ def test_create_with_customizations
end

def test_create_with_invalid_customizations
@product.update_attributes(customizations: 'foo_cust')
@product.update(customizations: 'foo_cust')

post storefront_api.cart_items_path(@order),
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_invalid_user

# don't allow users to grab other users's checkouts
other_user = create_user
@order.update_attributes!(user_id: other_user.id)
@order.update!(user_id: other_user.id)

get storefront_api.cart_path(@order),
headers: { 'HTTP_AUTHORIZATION' => encode_credentials(auth.token) }
Expand All @@ -83,7 +83,7 @@ def test_check_inventory
end

def test_purchasable_items
@product.variants.first.update_attributes!(active: false)
@product.variants.first.update!(active: false)

get storefront_api.cart_path(@order)
result = JSON.parse(response.body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Api
module Storefront
class SearchesIntegrationTest < IntegrationTest
def test_shows_search_results
Search::Settings.current.update_attributes!(terms_facets: %w(Color Size))
Search::Settings.current.update!(terms_facets: %w(Color Size))
create_product(
id: 'PRODUCT1',
name: 'Pretty Nice Shirt',
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_shows_search_results
end

def test_shows_no_search_results
Search::Settings.current.update_attributes!(terms_facets: %w(Color Size))
Search::Settings.current.update!(terms_facets: %w(Color Size))
create_product(
id: 'PRODUCT1',
name: 'Pretty Nice Shirt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_show
end

def test_inactive_taxon
@taxon.update_attributes!(
@taxon.update!(
url: nil,
navigable: create_page(active: false)
)
Expand Down
Loading
Loading