Sha256: 47ed79a797286f038c4c30593ab03cc2178d224ce38c5491d4cd5e6c7bd2ec53
Contents?: true
Size: 737 Bytes
Versions: 9
Compression:
Stored size: 737 Bytes
Contents
module Comable class UsersController < Comable::ApplicationController include Comable::PermittedAttributes before_filter :authenticate_user! def show @orders = current_comable_user.orders.page(params[:page]).per(Comable::Config.orders_per_page) end def update_addresses current_comable_user.attributes = user_params if current_comable_user.save flash.now[:notice] = Comable.t('successful') else flash.now[:alert] = Comable.t('failure') end render :addresses end def user_params params.require(:user).permit( :bill_address_id, :ship_address_id, addresses_attributes: permitted_address_attributes ) end end end
Version data entries
9 entries across 9 versions & 2 rubygems