mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-04-04 05:33:22 -04:00
* Added scoped TimeEntry model * Removed setting defaults in TimeEntry controller * Still working on tests…
16 lines
454 B
Ruby
16 lines
454 B
Ruby
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
|