Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Apr 19, 2023
1 parent e393438 commit de595f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/controllers/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ def index
@registrations = @registrations.paginate(page: params[:page], per_page: 25)
end

def show
@registration = Registration.find_by(token: params[:token])
return head(:not_found) unless @registration

@event = @registration.event
@barcode = GenerateHtmlBarcodes.new(@registration.barcode_data).call
end

def new
@event = Event.find params.require(:event_id)
@registration = Registration.new
Expand Down Expand Up @@ -54,14 +62,6 @@ def create
end
end

def show
@registration = Registration.find_by(token: params[:token])
return head(:not_found) unless @registration

@event = @registration.event
@barcode = GenerateHtmlBarcodes.new(@registration.barcode_data).call
end

def update
@registration = Registration.find params.require(:id)
authorize! :update, @registration
Expand Down

0 comments on commit de595f2

Please sign in to comment.