Commit 04e227b7
Changed files (11)
app
spec
controllers
app/models/admin_user.rb
@@ -5,5 +5,5 @@ class AdminUser < ActiveRecord::Base
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
- attr_accessible :email, :password, :password_confirmation, :remember_me
+ #attr_accessible :email, :password, :password_confirmation, :remember_me
end
app/models/category.rb
@@ -1,6 +1,6 @@
class Category < ActiveRecord::Base
has_and_belongs_to_many :creations, :join_table => 'creations_categories'
- attr_accessible :name, :slug
+ #attr_accessible :name, :slug
#default_scope -> { order(:name) }
def to_param
app/models/creation.rb
@@ -1,6 +1,6 @@
class Creation < ActiveRecord::Base
validates :name, :presence => true
- attr_accessible :user_id, :story, :name, :category_ids, :is_restricted, :watermark
+ #attr_accessible :user_id, :story, :name, :category_ids, :is_restricted, :watermark
belongs_to :user, :counter_cache => true
has_and_belongs_to_many :categories, -> { where unique: true }, :join_table => 'creations_categories', :autosave => true
has_many :photos, -> { order :created_at }, :dependent => :destroy
app/models/favorite.rb
@@ -1,5 +1,5 @@
class Favorite < ActiveRecord::Base
belongs_to :user
belongs_to :creation, :counter_cache => true
- attr_accessible :user_id, :creation_id
+ #attr_accessible :user_id, :creation_id
end
app/models/interest.rb
@@ -1,3 +1,3 @@
class Interest < ActiveRecord::Base
- attr_accessible :name
+ #attr_accessible :name
end
app/models/photo.rb
@@ -1,5 +1,5 @@
class Photo < ActiveRecord::Base
- attr_accessible :is_primary, :creation, :image
+ #attr_accessible :is_primary, :creation, :image
belongs_to :creation, :counter_cache => true
validates :image, :presence => true
mount_uploader :image, PhotoUploader
app/models/tutorial.rb
@@ -1,5 +1,5 @@
class Tutorial < ActiveRecord::Base
- attr_accessible :description, :heading, :url, :image_url, :user_id, :author, :author_url
+ #attr_accessible :description, :heading, :url, :image_url, :user_id, :author, :author_url
validates :url, :presence => true
belongs_to :user
acts_as_taggable
app/models/user.rb
@@ -10,7 +10,7 @@ class User < ActiveRecord::Base
validates :name, :presence => true
validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable
- attr_accessible :name, :email, :website, :twitter, :facebook, :city, :latitude, :longitude, :password, :password_confirmation, :current_password, :remember_me, :interest_ids
+ #attr_accessible :name, :email, :website, :twitter, :facebook, :city, :latitude, :longitude, :password, :password_confirmation, :current_password, :remember_me, :interest_ids
has_many :creations, :dependent => :destroy
has_many :favorites, :dependent => :destroy
has_many :tutorials, :dependent => :destroy
Gemfile
@@ -30,7 +30,7 @@ gem 'airbrake'
gem 'geocoder'
gem 'pg'
gem 'asset_sync'
-gem 'protected_attributes'
+#gem 'protected_attributes'
group :development do
gem 'capistrano'
Gemfile.lock
@@ -170,8 +170,6 @@ GEM
orm_adapter (0.4.0)
pg (0.16.0)
polyglot (0.3.3)
- protected_attributes (1.0.3)
- activemodel (>= 4.0.0, < 5.0)
rack (1.5.2)
rack-mini-profiler (0.1.27)
rack (>= 1.1.3)
@@ -299,7 +297,6 @@ DEPENDENCIES
lol_dba
newrelic_rpm
pg
- protected_attributes
rack-mini-profiler
rails (= 4.0.0)
rmagick