@@ -230,7 +230,7 private | |||||
230 | end |
|
230 | end | |
231 |
|
231 | |||
232 | def find_time_entries |
|
232 | def find_time_entries | |
233 | @time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).to_a |
|
233 | @time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).preload(:project, :user).to_a | |
234 | raise ActiveRecord::RecordNotFound if @time_entries.empty? |
|
234 | raise ActiveRecord::RecordNotFound if @time_entries.empty? | |
235 | raise Unauthorized unless @time_entries.all? {|t| t.editable_by?(User.current)} |
|
235 | raise Unauthorized unless @time_entries.all? {|t| t.editable_by?(User.current)} | |
236 | @projects = @time_entries.collect(&:project).compact.uniq |
|
236 | @projects = @time_entries.collect(&:project).compact.uniq |
General Comments 0
You need to be logged in to leave comments.
Login now