Sha256: 448a4844b9a6b77248522a2d1275043d7fbd6d8e6e1b52ac6115de900691b525

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

# encoding: utf-8

module InvoiceBar
  class AccountsController < InvoiceBar::ApplicationController
    inherit_resources
    respond_to :html, :json 
    
    before_filter :require_login
    before_filter :fetch_currencies, :only => [:new, :create, :edit, :update]
    
    def create
      @account = Account.new(params[:account])    
      current_user.accounts << @account
      
      create! {}
    end
    
    def update
      update! {}
    end
    
    def destroy
      destroy! {}
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
invoice_bar-0.0.3 app/controllers/invoice_bar/accounts_controller.rb
invoice_bar-0.0.2 app/controllers/invoice_bar/accounts_controller.rb
invoice_bar-0.0.1 app/controllers/invoice_bar/accounts_controller.rb