Sha256: 2a0098ed72f7d115546f0718e4f60c29ed307c9fb2fdcf66a6207bae5dd7fb69
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
module ShoppingCart class AddressesController < ApplicationController include Rectify::ControllerHelpers before_action :authenticate_user! def update SettingsAddresser.call(address_params) do on(:ok) { redirect_to address_path, notice: I18n.t('notice.updated') } on(:invalid) do |address| expose(address: address) render :edit end end end private def address_params params.require(:address).permit(:first_name, :last_name, :address, :city, :zip, :country, :phone, :type, :user_id) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loker-shopping-cart-0.1.2 | app/controllers/shopping_cart/addresses_controller.rb |
loker-shopping-cart-0.1.1 | app/controllers/shopping_cart/addresses_controller.rb |