Introduce strong parameters
This commit is contained in:
parent
38bc2e3c3a
commit
355ecc0ac6
93 changed files with 172 additions and 241 deletions
|
|
@ -3,8 +3,6 @@ class TicketPurchase < ActiveRecord::Base
|
|||
belongs_to :user
|
||||
belongs_to :conference
|
||||
|
||||
attr_accessible :ticket_id, :user_id, :conference_id, :paid, :quantity
|
||||
|
||||
validates :ticket_id, :user_id, :conference_id, :quantity, presence: true
|
||||
|
||||
validates_numericality_of :quantity, greater_than: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue