Sha256: 5e312e039ada16c99e5753ca0c46001c3cfc5d1620cd877dc3ceaf6667e055a5

Contents?: true

Size: 714 Bytes

Versions: 5

Compression:

Stored size: 714 Bytes

Contents

class Saasaparilla::ContactInfoController < ApplicationController
  unloadable
  include Authentication::InstanceMethods
  before_filter :get_subscription
  before_filter :get_contact_info
  
  def edit
    
  end
  
  def update
    if @contact_info.update_attributes(params[:contact_info])
      flash[:notice] = "Contact info was successfully updated."
      redirect_to subscription_path
    else
      flash[:error] = "An error has occurred when trying to update your contact info."
      render :action => "edit"
    end
  end
  
  private 
  
  def get_subscription
    @subscription = current_billable.subscription
  end
  
  def get_contact_info
    @contact_info = @subscription.contact_info
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
saasaparilla-0.2.2 app/controllers/saasaparilla/contact_info_controller.rb
saasaparilla-0.2.1 app/controllers/saasaparilla/contact_info_controller.rb
saasaparilla-0.1.8 app/controllers/saasaparilla/contact_info_controller.rb
saasaparilla-0.1.7 app/controllers/saasaparilla/contact_info_controller.rb
saasaparilla-0.1.6 app/controllers/saasaparilla/contact_info_controller.rb