Class: LogsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- LogsController
- Defined in:
- app/controllers/logs_controller.rb
Instance Attribute Summary collapse
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
Instance Method Summary collapse
Instance Attribute Details
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
18 19 20 |
# File 'app/controllers/logs_controller.rb', line 18 def mode @mode end |
Instance Method Details
#view ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/logs_controller.rb', line 3 def view @mode = params[:mode] @year, @month = params[:year].to_i, params[:month].to_i first_day = Date.new(@year, @month) @month_range = first_day .. ((first_day >> 1) - 1) @accounts = Account.all(:order => "position") @categories = Category.hashed @cat_all = [ @categories[:expense], @categories[:income], @categories[:move], ].flatten(1) end |