conference: refactor code and tests

This commit is contained in:
Rishabh Saxena 2016-08-29 19:49:25 +05:30
parent 53291e25b5
commit fe828d24db
No known key found for this signature in database
GPG key ID: FA3BDC38A9CB6807
2 changed files with 2 additions and 2 deletions

View file

@ -654,7 +654,7 @@ class Conference < ActiveRecord::Base
# after the conference has been successfully created
# Will create 1 new record for 'free' ticket
def create_free_ticket
ticket = Ticket.where(conference: self, title: 'Free Access', price_cents: 0).first_or_create!(description: 'Get free access tickets for the conference.')
tickets.where(title: 'Free Access', price_cents: 0).first_or_create!(description: 'Get free access tickets for the conference.')
end
##