Bundle update and ApplicationRecord as required in rails 5.1+

This commit is contained in:
echarp 2017-05-27 09:34:24 +02:00
parent bdd522a5ff
commit 26a718a90c
11 changed files with 21 additions and 19 deletions

View File

@ -7,7 +7,3 @@ BlockLength:
- config/routes.rb - config/routes.rb
Rails/HttpPositionalArguments: Rails/HttpPositionalArguments:
Enabled: false Enabled: false
# https://github.com/bbatsov/rubocop/issues/4189
# TODO remove once rubocopy has changed beyond 0.48.1
Lint/AmbiguousBlockAssociation:
Enabled: false

View File

@ -1,6 +1,6 @@
GIT GIT
remote: git://github.com/activeadmin/activeadmin.git remote: git://github.com/activeadmin/activeadmin.git
revision: 8f7f58016802cd5a7f663fbc80b90b884252f939 revision: d941aaa88c6e9011f7e9d1c7d85b2cd871160f0f
specs: specs:
activeadmin (1.0.0) activeadmin (1.0.0)
arbre (>= 1.1.1) arbre (>= 1.1.1)
@ -72,8 +72,8 @@ GEM
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4) thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
acts-as-taggable-on (4.0.0) acts-as-taggable-on (5.0.0)
activerecord (>= 4.0) activerecord (>= 4.2.8)
addressable (2.5.1) addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2) public_suffix (~> 2.0, >= 2.0.2)
arbre (1.1.1) arbre (1.1.1)
@ -92,9 +92,9 @@ GEM
thor (~> 0.18) thor (~> 0.18)
byebug (9.0.6) byebug (9.0.6)
coderay (1.1.1) coderay (1.1.1)
coffee-rails (4.2.1) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x) railties (>= 4.0.0)
coffee-script (2.4.1) coffee-script (2.4.1)
coffee-script-source coffee-script-source
execjs execjs
@ -268,6 +268,7 @@ GEM
paper_trail (7.0.2) paper_trail (7.0.2)
activerecord (>= 4.0, < 5.2) activerecord (>= 4.0, < 5.2)
request_store (~> 1.1) request_store (~> 1.1)
parallel (1.11.2)
parser (2.4.0.0) parser (2.4.0.0)
ast (~> 2.2) ast (~> 2.2)
piwik_analytics (1.0.2) piwik_analytics (1.0.2)
@ -338,7 +339,8 @@ GEM
responders (2.4.0) responders (2.4.0)
actionpack (>= 4.2.0, < 5.3) actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3)
rubocop (0.48.1) rubocop (0.49.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0) parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
@ -389,7 +391,7 @@ GEM
thor (0.19.4) thor (0.19.4)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.7) tilt (2.0.7)
tinymce-rails (4.6.1) tinymce-rails (4.6.2)
railties (>= 3.1.1) railties (>= 3.1.1)
tinymce-rails-langs (4.20160310) tinymce-rails-langs (4.20160310)
tinymce-rails (~> 4.1, >= 4.1.10) tinymce-rails (~> 4.1, >= 4.1.10)

View File

@ -1,5 +1,5 @@
# The new agenda moderators, from active_admin # The new agenda moderators, from active_admin
class AdminUser < ActiveRecord::Base class AdminUser < ApplicationRecord
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable # :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, devise :database_authenticatable,

View File

@ -0,0 +1,4 @@
# Base domain class
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View File

@ -2,7 +2,7 @@
# #
# It is mainly used to manage coordinates # It is mainly used to manage coordinates
# #
class City < ActiveRecord::Base class City < ApplicationRecord
has_many :events, foreign_key: :city, primary_key: :name has_many :events, foreign_key: :city, primary_key: :name
has_many :orgas, foreign_key: :city, primary_key: :name has_many :orgas, foreign_key: :city, primary_key: :name
end end

View File

@ -1,7 +1,7 @@
require 'schedule' require 'schedule'
# This is the central ADL class, where are managed all events # This is the central ADL class, where are managed all events
class Event < ActiveRecord::Base class Event < ApplicationRecord
extend SimpleCalendar extend SimpleCalendar
include Schedule include Schedule
acts_as_taggable acts_as_taggable

View File

@ -1,4 +1,4 @@
# Gives the possibility to organise organisations! :) # Gives the possibility to organise organisations! :)
class Kind < ActiveRecord::Base class Kind < ApplicationRecord
has_many :orgas has_many :orgas
end end

View File

@ -1,5 +1,5 @@
# Manages data related to events' moderation # Manages data related to events' moderation
class Note < ActiveRecord::Base class Note < ApplicationRecord
belongs_to :event belongs_to :event
belongs_to :author, class_name: User belongs_to :author, class_name: User

View File

@ -1,5 +1,5 @@
# Organisations related to this agenda # Organisations related to this agenda
class Orga < ActiveRecord::Base class Orga < ApplicationRecord
acts_as_taggable acts_as_taggable
strip_attributes strip_attributes
has_paper_trail ignore: %i[last_updated secret submitter decision_time has_paper_trail ignore: %i[last_updated secret submitter decision_time

View File

@ -1,5 +1,5 @@
# This is mostly to group events around a region # This is mostly to group events around a region
class Region < ActiveRecord::Base class Region < ApplicationRecord
belongs_to :region belongs_to :region
has_many :regions has_many :regions

View File

@ -2,7 +2,7 @@ require 'digest/md5'
# Moderators, but using a failed pwd mechanism # Moderators, but using a failed pwd mechanism
# TODO, migrate to full active_admin # TODO, migrate to full active_admin
class User < ActiveRecord::Base class User < ApplicationRecord
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable # :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, authentication_keys: [:login] devise :database_authenticatable, authentication_keys: [:login]