Skip to content

Commit

Permalink
Change ActiveRecord::Base to ApplicationRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
haru committed Nov 16, 2024
1 parent ebb6888 commit bad8c5d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsComment < ActiveRecord::Base
class WikiExtensionsComment < ApplicationRecord
belongs_to :user
belongs_to :wiki_page
validates_presence_of :comment, :wiki_page_id, :user_id
Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsCount < ActiveRecord::Base
class WikiExtensionsCount < ApplicationRecord
belongs_to :project
belongs_to :page, :foreign_key => :page_id, :class_name => 'WikiPage'
validates_presence_of :project
Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsMenu < ActiveRecord::Base
class WikiExtensionsMenu < ApplicationRecord
include Redmine::SafeAttributes
belongs_to :project
validates_presence_of :project_id
Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsSetting < ActiveRecord::Base
class WikiExtensionsSetting < ApplicationRecord
belongs_to :project
#attr_accessible :auto_preview_enabled, :tag_disabled

Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsTag < ActiveRecord::Base
class WikiExtensionsTag < ApplicationRecord
#attr_accessible :name, :project_id
validates_presence_of :name, :project_id
validates_uniqueness_of :name, :scope => :project_id
Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki_extensions_tag_relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WikiExtensionsTagRelation < ActiveRecord::Base
class WikiExtensionsTagRelation < ApplicationRecord
belongs_to :wiki_page
belongs_to :tag, :class_name => 'WikiExtensionsTag', :foreign_key => :tag_id
validates_presence_of :wiki_page_id, :tag_id
Expand Down
3 changes: 1 addition & 2 deletions app/models/wiki_extensions_vote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

class WikiExtensionsVote < ActiveRecord::Base
class WikiExtensionsVote < ApplicationRecord
validates_presence_of :target_class_name, :target_id, :keystr, :count
validates_uniqueness_of :keystr, :scope => [:target_class_name, :target_id]

Expand Down Expand Up @@ -48,4 +48,3 @@ def self.find_or_create(class_name, obj_id, key_str)
return vote
end
end

0 comments on commit bad8c5d

Please sign in to comment.