-
Notifications
You must be signed in to change notification settings - Fork 2
Jose romero #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/grouping-transactions
Are you sure you want to change the base?
Jose romero #2
Changes from all commits
b57c609
ca243ae
9c36ef2
f07a3f0
02af398
29811c7
d786216
00136af
b375358
9161194
99e0764
04ee6b9
c3ee360
6580d9d
1dc0c24
5dfba28
e34395a
d6e7b0c
956346f
54d3237
983d984
1b37b74
20d6ebc
7a0a201
4de84e7
655229b
e19f650
70d7aa9
55dd014
f92bf63
5a41e12
e9198fb
3c557df
e72feb9
eeafc9d
8950a9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,5 @@ | |
| config/database.yml | ||
| config/config.yml | ||
|
|
||
|
|
||
| PocketMoneyDB.sql | ||
| **/.DS_Store | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --color |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,5 +6,6 @@ def index | |
|
|
||
| def show | ||
| @account = Account.find(params[:id]) | ||
| @transactions = @account.active_transactions | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,8 @@ class Transaction < ActiveRecord::Base | |
|
|
||
| belongs_to :account | ||
| has_many :splits | ||
|
|
||
| validates :account_id, presence: true | ||
| validates :amount, presence: true | ||
|
|
||
| def split? | ||
| @split ||= splits.size > 1 | ||
|
|
@@ -154,7 +155,7 @@ def transaction_query | |
| t = transaction_interval | ||
| t = t.where(pm_type: pm_type) if pm_type | ||
| t = t.where(account_id: account_id) if account_id | ||
| t = t.where('categories.id = ?', category_id) if category_id | ||
| #t = t.where('categories.id = ?', category_id) if category_id | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the comment? |
||
| t | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,14 +31,14 @@ | |
| <%= f.label :category_id %><br> | ||
| <%= f.number_field :category_id %> | ||
| </div> | ||
| <div class="field"> | ||
| <%= f.label :class_id %><br> | ||
| <%= f.number_field :class_id %> | ||
| </div> | ||
| <div class="field"> | ||
| <%= f.label :memo %><br> | ||
| <%= f.text_area :memo %> | ||
| </div> | ||
| <%#<div class="field">%> | ||
| <%#<%= f.label :class_id %><br>%> | ||
| <%#<%= f.number_field :class_id %>%> | ||
| <%#</div>%> | ||
| <%#<div class="field">%> | ||
| <%#<%= f.label :memo %><br>%> | ||
| <%#<%= f.text_area :memo %>%> | ||
| <%#</div>%> | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this commented lines? |
||
| <div class="field"> | ||
| <%= f.label :amount %><br> | ||
| <%= f.text_field :amount %> | ||
|
|
@@ -47,18 +47,18 @@ | |
| <%= f.label :cleared %><br> | ||
| <%= f.check_box :cleared %> | ||
| </div> | ||
| <div class="field"> | ||
| <%= f.label :currency_id %><br> | ||
| <%= f.text_field :currency_id %> | ||
| </div> | ||
| <div class="field"> | ||
| <%= f.label :currency_exchange_rate %><br> | ||
| <%= f.text_field :currency_exchange_rate %> | ||
| </div> | ||
| <div class="field"> | ||
| <%= f.label :balance %><br> | ||
| <%= f.text_field :balance %> | ||
| </div> | ||
| <%#<div class="field">%> | ||
| <%#<%= f.label :currency_id %><br>%> | ||
| <%#<%= f.text_field :currency_id %>%> | ||
| <%#</div>%> | ||
| <%#<div class="field">%> | ||
| <%#<%= f.label :currency_exchange_rate %><br>%> | ||
| <%#<%= f.text_field :currency_exchange_rate %>%> | ||
| <%#</div>%> | ||
| <%#<div class="field">%> | ||
| <%#<%= f.label :balance %><br>%> | ||
| <%#<%= f.text_field :balance %>%> | ||
| <%#</div>%> | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the comments? |
||
| <div class="actions"> | ||
| <%= f.submit %> | ||
| </div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| require 'pocket_money' | ||
| require 'pocket_money' if ENV["RAILS_ENV"] != 'test' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faker goes inside the test block