-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevented deletion of clients/projects with associated data, and tested.
- Loading branch information
Showing
8 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
* don't allow deletion of clients/projects if event data exists | ||
* limit users to one active event or allow parallel (make an option?) | ||
* handling of unverified request? | ||
* Github-style page sliding when changing pages? | ||
* Monthly Report takes up too much width | ||
|
||
* indexes on db columns | ||
* testing/handling for: | ||
* events that overlap midnight <- for now apply hours to start day | ||
* events that overlap a DST-type change (handled automatically?) | ||
|
||
* limit users to one active event or allow parallel (make an option?) | ||
* what about personal projects or projects for small clients with no sub projects? how to make that clean and easy? |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class Project < ActiveRecord::Base | ||
belongs_to :client | ||
has_many :events | ||
has_many :events, :dependent => :restrict | ||
default_scope order('LOWER(title) ASC') | ||
validates_presence_of :title | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FactoryGirl.define do | ||
factory :client do | ||
name 'Foo Inc.' | ||
end | ||
|
||
factory :project do | ||
client | ||
title 'Hard Work' | ||
end | ||
|
||
factory :event do |f| | ||
f.project | ||
f.comment 'An event' | ||
f.start { 1.hour.ago } | ||
f.end { Time.now } | ||
end | ||
end |
This file contains 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
This file contains 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