discourse/app/models/user_open_id.rb
Ian Christian Myers 0d01c33482 Enabled strong_parameters across all models/controllers.
All models are now using ActiveModel::ForbiddenAttributesProtection, which shifts the responsibility for parameter whitelisting for mass-assignments from the model to the controller. attr_accessible has been disabled and removed as this functionality replaces that.

The require_parameters method in the ApplicationController has been removed in favor of strong_parameters' #require method.

It is important to note that there is still some refactoring required to get all parameters to pass through #require and #permit so that we can guarantee that parameter values are scalar. Currently strong_parameters, in most cases, is only being utilized to require parameters and to whitelist the few places that do mass-assignments.
2013-06-06 00:30:59 -07:00

25 lines
533 B
Ruby

class UserOpenId < ActiveRecord::Base
belongs_to :user
validates_presence_of :email
validates_presence_of :url
end
# == Schema Information
#
# Table name: user_open_ids
#
# id :integer not null, primary key
# user_id :integer not null
# email :string(255) not null
# url :string(255) not null
# created_at :datetime not null
# updated_at :datetime not null
# active :boolean not null
#
# Indexes
#
# index_user_open_ids_on_url (url)
#