This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PostsController < ApplicationController | |
| def show | |
| @post = Post.includes(comments: :user).find(params[:id]) | |
| respond_to do |format| | |
| format.html # show.html.erb | |
| format.json { render json: @post } | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LineItem | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| TYPE = %w[income expense] | |
| INCOME = 0 | |
| EXPENSE = 1 | |
| TRANSFER_IN = 'Transfer In' | |
| TRANSFER_OUT = 'Transfer Out' |
NewerOlder