Skip to content

Commit

Permalink
Delint
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 17, 2023
1 parent 6bc0f47 commit 6d6c4f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/ticket_scannings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class TicketScanningsController < Admin::BaseController
skip_authorize_resource only: [:create]

def create
if not @physical_ticket and params[:physical_ticket]
if !@physical_ticket && params[:physical_ticket]
@physical_ticket = PhysicalTicket.find_by(token: params[:physical_ticket][:token])
end
@ticket_scanning = TicketScanning.new(physical_ticket: @physical_ticket)
authorize! :create, @ticket_scanning
@ticket_scanning.save
dest_path = conferences_path
if request.referer.match?(/admin\/conferences/)
if request.referer.match?(%r{admin/conferences})
dest_path = admin_conference_physical_tickets_path(@conference)
end
redirect_to dest_path,
Expand Down
1 change: 1 addition & 0 deletions app/helpers/date_time_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def length_timestamp(length)
# * +String+ -> formated datetime object
def format_datetime(obj)
return unless obj

obj = DateTime.parse(obj) unless ob.respond_to?(:strftime)

obj.strftime('%Y-%m-%d %H:%M')
Expand Down

0 comments on commit 6d6c4f6

Please sign in to comment.