Skip to content

Commit

Permalink
Merge pull request #331 from snap-cloud/reg-pluralize-bugfix
Browse files Browse the repository at this point in the history
Two Minor Bugfixes
  • Loading branch information
cycomachead authored Jul 18, 2023
2 parents 1d13597 + de69156 commit b480c7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/ticket_scannings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create
@ticket_scanning.save
dest_path = conferences_path
if request.referer&.match?(%r{admin/conferences})
dest_path = admin_conference_physical_tickets_path(@conference)
dest_path = admin_conference_physical_tickets_path(conference_id: @conference.short_title)
end
redirect_to dest_path,
notice: "Ticket with token #{@physical_ticket.token} successfully scanned."
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/format_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def class_for_todo(bool)
end

def word_pluralize(count, singular, plural = nil)
if count == 1 || count =~ /^1(\.0+)?$/
if count.positive? && count < 2
singular
else
plural || singular.pluralize
Expand Down

0 comments on commit b480c7c

Please sign in to comment.