Sha256: fcb286a9fe15a3a84fa66b162611c36b1bc28bde584eead2b91fad473bf73f51
Contents?: true
Size: 857 Bytes
Versions: 16
Compression:
Stored size: 857 Bytes
Contents
module Workarea module Api module Storefront class SavedAddressesController < Api::Storefront::ApplicationController def index @addresses = current_user.addresses end def show @address = current_user.addresses.find(params[:id]) end def create @address = current_user.addresses.create!(address_params) render :show end def update @address = current_user.addresses.find(params[:id]) @address.update_attributes!(address_params) render :show end def destroy current_user.addresses.find(params[:id]).destroy head :no_content end private def address_params params.permit(*Workarea.config.address_attributes) end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems