• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_describe / d9f86608-3df2-4f43-8850-71459996c82b

25 Mar 2024 12:07PM UTC coverage: 30.999% (-65.2%) from 96.206%
d9f86608-3df2-4f43-8850-71459996c82b

Pull #1710

circleci

carolyncole
Separating edit into wizard and non wizard controller methods
Pull Request #1710: Separating wizard new & edit and non wizard new & edit controller methods

956 of 3084 relevant lines covered (31.0%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.33
/app/controllers/work_activity_notifications_controller.rb
1
# frozen_string_literal: true
2
class WorkActivityNotificationsController < ApplicationController
1✔
3
  before_action :set_activity_notification, only: %i[show]
1✔
4

5
  # GET /activity_notifications or /activity_notifications.json
6
  def index
1✔
7
    @work_activity_notifications = WorkActivityNotification.where(user_id: user.id).order(created_at: :desc)
×
8
  end
9

10
  # GET /activity_notifications/1 or /activity_notifications/1.json
11
  def show; end
1✔
12

13
  private
1✔
14

15
    # Use callbacks to share common setup or constraints between actions.
16
    def set_activity_notification
1✔
17
      @work_activity_notification = WorkActivityNotification.find(params[:id])
×
18
    end
19

20
    def user
1✔
21
      @user ||= if user_param
×
22
                  User.find_by(uid: user_param) || current_user
×
23
                else
24
                  current_user
×
25
                end
26
    end
27

28
    def user_param
1✔
29
      return nil unless current_user.super_admin?
×
30
      @user_param ||= params[:user]
×
31
    end
32
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc