mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-08-19 06:40:43 -04:00
extract controller base class
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# base class for stopwatch controllers
|
||||
class StopwatchController < ApplicationController
|
||||
helper :timelog, :custom_fields
|
||||
|
||||
before_action :require_login
|
||||
|
||||
private
|
||||
|
||||
def authorize_edit_time
|
||||
@time_entry.editable_by?(User.current) or deny_access
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user