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