WIP, cleaned up api/time_entries, added TimeEntry

* Added scoped TimeEntry model
* Removed setting defaults in TimeEntry controller
* Still working on tests…
This commit is contained in:
Jason Denney
2014-04-26 20:06:47 -04:00
parent c0a9d8c1e5
commit 1191014471
3 changed files with 50 additions and 15 deletions
+15
View File
@@ -0,0 +1,15 @@
class TimeEntry < ActsAsLoggable::Log
default_scope where( loggable_type: "User",
logger_type: "User",
log_action_type: "ActsAsLoggable::UserAction")
def copy_to_bike_history(bike_id)
self.assign_attributes({
copy_log: true,
copy_type: 'Bike',
copy_id: bike_id,
copy_action_type: 'ActsAsLoggable::BikeAction',
copy_action_id: 4
})
end
end