Class: InvoiceBar::CurrenciesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/invoice_bar/currencies_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /currencies POST /currencies.json



31
32
33
34
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 31

def create
  @currency = InvoiceBar::Currency.new(currency_params)
  respond_on_create @currency
end

#destroyObject

DELETE /currencies/1 DELETE /currencies/1.json



44
45
46
47
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 44

def destroy
  @currency.destroy
  respond_on_destroy @currency, currency_url
end

#editObject

GET /currencies/1/edit



26
27
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 26

def edit
end

#indexObject

GET /currencies GET /currencies.json



8
9
10
11
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 8

def index
  @currencies = InvoiceBar::Currency.all.page(params[:page])
  respond_on_index @currencies
end

#newObject

GET /currencies/new



20
21
22
23
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 20

def new
  @currency = InvoiceBar::Currency.new
  respond_on_new @currency
end

#showObject

GET /currencies/1 GET /currencies/1.json



15
16
17
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 15

def show
  respond_on_show @currency
end

#updateObject

PATCH/PUT /currencies/1 PATCH/PUT /currencies/1.json



38
39
40
# File 'app/controllers/invoice_bar/currencies_controller.rb', line 38

def update
  respond_on_update @currency, currency_params
end