Created
May 27, 2020 19:59
-
-
Save frostyblok/06381476609c37939b4a20ded35a7b91 to your computer and use it in GitHub Desktop.
Subscription Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Admins | |
class SubscriptionsContoller < ApplicationController | |
# This is left empty because the instruction clearly says the subscriptions.html.erb | |
def index; end | |
# eager loading the subscription entity to include the plan associated data | |
def subscriptions | |
@subcriptions = Subscription.order(created_at: :desc).includes(:plan).page(params[:page]).per(100) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment