Commit f1e596fbee203b08f0195b83352f47aa37d8e970

Authored by Braulio Bhavamitra
1 parent c49be40f
Exists in rails5

rails5: attr_accesible

app/models/article_follower.rb
1 1 class ArticleFollower < ActiveRecord::Base
2 2  
3   - attr_accessible :article_id, :person_id
4 3 belongs_to :article, :counter_cache => :followers_count
5 4 belongs_to :person
6 5  
... ...
app/models/create_community.rb
... ... @@ -17,7 +17,6 @@ class CreateCommunity &lt; Task
17 17 end
18 18  
19 19 settings_items :custom_values
20   - attr_accessible :custom_values
21 20  
22 21 def validate
23 22 self.environment.required_community_fields.each do |field|
... ...
app/models/email_template.rb
... ... @@ -2,8 +2,6 @@ class EmailTemplate &lt; ActiveRecord::Base
2 2  
3 3 belongs_to :owner, :polymorphic => true
4 4  
5   - attr_accessible :template_type, :subject, :body, :owner, :name
6   -
7 5 validates_presence_of :name
8 6  
9 7 validates :name, uniqueness: { scope: [:owner_type, :owner_id] }
... ...
app/models/session.rb
1 1 class Session < ActiveRecord::SessionStore::Session
2 2  
3   - attr_accessible :session_id, :data
4   -
5 3 # removed and redefined on super class
6 4 def self.find_by_session_id session_id
7 5 super
... ...
plugins/community_track/lib/community_track_plugin/track_list_block.rb
... ... @@ -7,8 +7,6 @@ class CommunityTrackPlugin::TrackListBlock &lt; Block
7 7 settings_items :category_ids, :type => Array, :default => []
8 8 settings_items :order, :type => :string, :default => 'hits'
9 9  
10   - attr_accessible :more_another_page, :category_ids, :order
11   -
12 10 def self.description
13 11 _('Track List')
14 12 end
... ...
plugins/push_notification/lib/device_token.rb
1 1 class PushNotificationPlugin::DeviceToken < ActiveRecord::Base
  2 +
2 3 belongs_to :user
3   - attr_accessible :token, :device_name, :user
4 4  
5 5 after_save :check_notification_settings
6 6  
... ...
plugins/push_notification/lib/notification_settings.rb
... ... @@ -14,7 +14,6 @@ class PushNotificationPlugin::NotificationSettings &lt; ActiveRecord::Base
14 14 }
15 15  
16 16 belongs_to :user
17   - attr_accessible :user, :notifications
18 17  
19 18 def self.default_hash_flags
20 19 default_hash_flags = {}
... ...
plugins/push_notification/lib/notification_subscription.rb
1 1 class PushNotificationPlugin::NotificationSubscription < ActiveRecord::Base
  2 +
2 3 belongs_to :environment
3   - attr_accessible :subscribers, :notification, :environment
4 4  
5 5 validates :notification, :uniqueness => true
6 6 serialize :subscribers
... ...
plugins/sniffer/lib/ext/profile.rb
... ... @@ -10,9 +10,6 @@ class Profile
10 10 }, through: :sniffer_opportunities, source: :product_category, class_name: 'ProductCategory'
11 11  
12 12 attr_accessor :sniffer_interested_product_category_string_ids
13   - descendants.each do |k|
14   - k.attr_accessible :sniffer_interested_product_category_string_ids
15   - end
16 13  
17 14 def sniffer_interested_product_category_string_ids
18 15 ''
... ...
plugins/video/lib/video_plugin/video.rb
... ... @@ -16,8 +16,6 @@ class VideoPlugin::Video &lt; Article
16 16 settings_items :video_thumbnail_height, :type=> :integer
17 17 settings_items :video_duration, :type=> :integer, :default => 0
18 18  
19   - attr_accessible :video_url
20   -
21 19 before_save :fill_video_properties
22 20  
23 21 def self.type_name
... ... @@ -35,14 +33,14 @@ class VideoPlugin::Video &lt; Article
35 33 def self.description
36 34 _('Display embedded videos.')
37 35 end
38   -
  36 +
39 37 def is_youtube?
40 38 VideoPlugin::Video.is_youtube?(self.video_url)
41 39 end
42 40  
43 41 def is_vimeo?
44 42 VideoPlugin::Video.is_vimeo?(self.video_url)
45   - end
  43 + end
46 44  
47 45 include ActionView::Helpers::TagHelper
48 46 def to_html(options={})
... ...
plugins/video/lib/video_plugin/video_gallery_block.rb
1 1 class VideoPlugin::VideoGalleryBlock < Block
2 2  
3 3 settings_items :video_gallery_id, :type => :integer
4   - attr_accessible :video_gallery_id
5 4  
6 5 include ActionView::Helpers
7 6 include Rails.application.routes.url_helpers
... ...