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

sleede / fab-manager / #106

pending completion
#106

push

coveralls-ruby

sylvainbx
Merge branch 'dev' for release 6.0.0

704 of 704 new or added lines in 168 files covered. (100.0%)

7919 of 13474 relevant lines covered (58.77%)

15.29 hits per line

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

0.0
/app/controllers/api/user_packs_controller.rb
1
# frozen_string_literal: true
2

3
# API Controller for resources of type StatisticProfilePrepaidPack
4
class API::UserPacksController < API::APIController
×
5
  before_action :authenticate_user!
×
6

7
  def index
×
8
    @user_packs = PrepaidPackService.user_packs(user, item)
×
9

10
    @history = params[:history] == 'true'
×
11
    @user_packs = @user_packs.includes(:prepaid_pack_reservations) if @history
×
12
  end
×
13

14
  private
×
15

16
  def user
×
17
    return User.find(params[:user_id]) if current_user.privileged?
×
18

19
    current_user
×
20
  end
×
21

22
  def item
×
23
    return nil if params[:priceable_type].nil?
×
24

25
    params[:priceable_type].classify.constantize.find(params[:priceable_id])
×
26
  end
×
27
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

© 2026 Coveralls, Inc