Skip to content

Commit

Permalink
changed hours float to minutes integer in sessions and got rid of dat…
Browse files Browse the repository at this point in the history
…abase and logs from vc
  • Loading branch information
cooperq committed Mar 25, 2009
1 parent 2aed78d commit d0adc41
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 12,045 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#ignore all logs
log/*
db/*.sqlite3
5 changes: 3 additions & 2 deletions app/views/sessions/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<%= f.text_field :rate %>
</p>
<p>
<%= f.label :hours %><br />
<%= f.text_field :hours %>
<%= f.label :time %><br />
<%= f.text_field :minutes %>
</p>
<p>
<%= f.label :notes %><br />
Expand All @@ -34,3 +34,4 @@
<%= link_to 'Show', @session %> |
<%= link_to 'Back', sessions_path %>

3 changes: 2 additions & 1 deletion app/views/sessions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<td><%=h session.project_id %></td>
<td><%=h session.created_at %></td>
<td><%=h session.rate %></td>
<td><%=h session.hours %></td>
<td><%=h session.minutes %></td>
<td><%=h session.notes %></td>
<td><%= link_to 'Show', session %></td>
<td><%= link_to 'Edit', edit_session_path(session) %></td>
Expand All @@ -28,3 +28,4 @@
<br />

<%= link_to 'New session', new_session_path %>

3 changes: 2 additions & 1 deletion app/views/sessions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h2>Hours:</h2>
<div class='box' id='hours'>

<%=h @session.hours %>
<%=h @session.minutes %>
</div>
<h2>Notes:</h2>
<div class='box'>
Expand All @@ -18,3 +18,4 @@

<%= link_to 'Edit', edit_session_path(@session) %> |
<%= link_to 'Back', @session.project %>

Binary file removed db/development.sqlite3
Binary file not shown.
3 changes: 2 additions & 1 deletion db/migrate/20090319005331_create_sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def self.up
t.integer :user_id, :null => false
t.integer :project_id, :null => false
t.float :rate
t.float :hours, :null => false, :default => 0
t.integer :minutes, :null => false, :default => 0
t.text :notes

t.timestamps
Expand All @@ -15,3 +15,4 @@ def self.down
drop_table :sessions
end
end

6 changes: 3 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
end

create_table "sessions", :force => true do |t|
t.integer "user_id", :null => false
t.integer "project_id", :null => false
t.integer "user_id", :null => false
t.integer "project_id", :null => false
t.float "rate"
t.float "hours", :default => 0.0, :null => false
t.integer "minutes", :default => 0, :null => false
t.text "notes"
t.datetime "created_at"
t.datetime "updated_at"
Expand Down
12,037 changes: 0 additions & 12,037 deletions log/development.log

This file was deleted.

Empty file removed log/production.log
Empty file.
Empty file removed log/server.log
Empty file.
Empty file removed log/test.log
Empty file.

0 comments on commit d0adc41

Please sign in to comment.