Sha256: 0f07e6b2fcf406f880b22cc955e7c579f2327d37ece9aa3c180337afc72a72d8
Contents?: true
Size: 1.08 KB
Versions: 12
Compression:
Stored size: 1.08 KB
Contents
class Admin::Muck::BillingInformationsController < Admin::Muck::BaseController ssl_required :edit, :update before_filter :setup_user before_filter :setup_billing_information def index @billing_informations = BillingInformation.by_newest.all(:include => [:user]) end def new end def create end def edit end def update @billing_information.update_attributes(params[:billing_information]) response, message = @billing_information.update_remote_storage flash[:notice] = message unless message.blank? render :template => 'admin/coupons/edit' rescue MuckCommerce::Exceptions::PaymentGatewayError => ex flash[:error] = translate('muck.commerce.billing_information_update_error', :error => ex) render :template => 'admin/coupons/edit' end def destroy @billing_information.destroy redirect_to admin_user_path(@user) end protected def setup_user @user = User.find(params[:user_id]) end def setup_billing_information @billing_information = @user.billing_informations.find(params[:id]) end end
Version data entries
12 entries across 12 versions & 1 rubygems