remove attr_accessible
This commit is contained in:
parent
f81fdbf8cc
commit
dc51d0080e
5 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,10 @@
|
|||
class MetacodeSetsController < ApplicationController
|
||||
|
||||
before_filter :require_admin
|
||||
|
||||
def metacode_set_params
|
||||
params.require(:metacode_set).permit(:desc, :mapperContributed, :name)
|
||||
end
|
||||
|
||||
# GET /metacode_sets
|
||||
# GET /metacode_sets.json
|
||||
|
|
|
@ -3,6 +3,10 @@ class UsersController < ApplicationController
|
|||
before_filter :require_user, only: [:edit, :update, :updatemetacodes]
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
def user_params
|
||||
params.require(:user).permit(:name, :email, :image, :password,
|
||||
:password_confirmation, :code, :joinedwithcode, :remember_me)
|
||||
|
||||
# GET /users/1.json
|
||||
def show
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class InMetacodeSet < ActiveRecord::Base
|
||||
belongs_to :metacode, :class_name => "Metacode", :foreign_key => "metacode_id"
|
||||
belongs_to :metacode_set, :class_name => "MetacodeSet", :foreign_key => "metacode_set_id"
|
||||
# attr_accessible :title, :body
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
class MetacodeSet < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
attr_accessible :desc, :mapperContributed, :name
|
||||
has_many :in_metacode_sets
|
||||
has_many :metacodes, :through => :in_metacode_sets
|
||||
end
|
||||
|
|
|
@ -11,8 +11,6 @@ class User < ActiveRecord::Base
|
|||
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
|
||||
|
||||
attr_accessible :name, :email, :image, :password, :password_confirmation, :code, :joinedwithcode, :remember_me
|
||||
|
||||
serialize :settings, UserPreference
|
||||
|
||||
validates :password, :presence => true,
|
||||
|
|
Loading…
Reference in a new issue