Merge pull request #432 from differentreality/style_module
enable style ClassAndModuleChildren
This commit is contained in:
commit
ac25561523
23 changed files with 615 additions and 566 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
# Offense count: 20
|
# Offense count: 20
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::CallforpapersController < ApplicationController
|
module Admin
|
||||||
|
class CallforpapersController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -50,3 +51,4 @@ class Admin::CallforpapersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::CommercialsController < ApplicationController
|
module Admin
|
||||||
|
class CommercialsController < ApplicationController
|
||||||
before_action :set_conference
|
before_action :set_conference
|
||||||
before_action :set_commercial, only: [:edit, :update, :destroy]
|
before_action :set_commercial, only: [:edit, :update, :destroy]
|
||||||
|
|
||||||
|
|
@ -55,3 +56,4 @@ class Admin::CommercialsController < ApplicationController
|
||||||
params[:commercial]
|
params[:commercial]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ConferenceController < ApplicationController
|
module Admin
|
||||||
|
class ConferenceController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -173,3 +174,4 @@ class Admin::ConferenceController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ContactsController < ApplicationController
|
module Admin
|
||||||
|
class ContactsController < ApplicationController
|
||||||
before_action :set_conference
|
before_action :set_conference
|
||||||
before_action :set_contact, only: [:show, :edit, :update, :destroy]
|
before_action :set_contact, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
|
|
@ -42,3 +43,4 @@ class Admin::ContactsController < ApplicationController
|
||||||
params[:contact]
|
params[:contact]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::DietchoicesController < ApplicationController
|
module Admin
|
||||||
|
class DietchoicesController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -14,3 +15,4 @@ class Admin::DietchoicesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::DifficultyLevelsController < ApplicationController
|
module Admin
|
||||||
|
class DifficultyLevelsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -27,3 +28,4 @@ class Admin::DifficultyLevelsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::EmailsController < ApplicationController
|
module Admin
|
||||||
|
class EmailsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
@ -12,3 +13,4 @@ class Admin::EmailsController < ApplicationController
|
||||||
@settings = @conference.email_settings
|
@settings = @conference.email_settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::EventtypesController < ApplicationController
|
module Admin
|
||||||
|
class EventtypesController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -16,3 +17,4 @@ class Admin::EventtypesController < ApplicationController
|
||||||
alert: "Event types update failed: #{e.message}")
|
alert: "Event types update failed: #{e.message}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::QuestionsController < ApplicationController
|
module Admin
|
||||||
|
class QuestionsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -40,7 +41,6 @@ class Admin::QuestionsController < ApplicationController
|
||||||
|
|
||||||
# PUT questions/1
|
# PUT questions/1
|
||||||
def update
|
def update
|
||||||
|
|
||||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||||
@question = Question.find(params[:id])
|
@question = Question.find(params[:id])
|
||||||
|
|
||||||
|
|
@ -94,3 +94,4 @@ class Admin::QuestionsController < ApplicationController
|
||||||
@questions_conference = @conference.questions
|
@questions_conference = @conference.questions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::RoomsController < ApplicationController
|
module Admin
|
||||||
|
class RoomsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -17,3 +18,4 @@ class Admin::RoomsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::SocialEventsController < ApplicationController
|
module Admin
|
||||||
|
class SocialEventsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -13,3 +14,4 @@ class Admin::SocialEventsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::SupporterLevelsController < ApplicationController
|
module Admin
|
||||||
|
class SupporterLevelsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -14,3 +15,4 @@ class Admin::SupporterLevelsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::SupportersController < ApplicationController
|
module Admin
|
||||||
|
class SupportersController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -14,3 +15,4 @@ class Admin::SupportersController < ApplicationController
|
||||||
redirect_to(admin_conference_supporters_path(conference_id: @conference.short_title), notice: "Supporter added")
|
redirect_to(admin_conference_supporters_path(conference_id: @conference.short_title), notice: "Supporter added")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::TracksController < ApplicationController
|
module Admin
|
||||||
|
class TracksController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
@ -20,3 +21,4 @@ class Admin::TracksController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::VenueController < ApplicationController
|
module Admin
|
||||||
|
class VenueController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -28,3 +29,4 @@ class Admin::VenueController < ApplicationController
|
||||||
render :venue_info
|
render :venue_info
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::VolunteersController < ApplicationController
|
module Admin
|
||||||
|
class VolunteersController < ApplicationController
|
||||||
def index
|
def index
|
||||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||||
render :index
|
render :index
|
||||||
|
|
@ -23,3 +24,4 @@ class Admin::VolunteersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
class Api::BaseController < ActionController::Base
|
module Api
|
||||||
|
class BaseController < ActionController::Base
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
class Api::V1::ConferencesController < Api::BaseController
|
module Api
|
||||||
|
module V1
|
||||||
|
class ConferencesController < Api::BaseController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -10,3 +12,5 @@ class Api::V1::ConferencesController < Api::BaseController
|
||||||
render json: conferences, serializer: ConferencesArraySerializer
|
render json: conferences, serializer: ConferencesArraySerializer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
class Api::V1::RoomsController < Api::BaseController
|
module Api
|
||||||
|
module V1
|
||||||
|
class RoomsController < Api::BaseController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -11,3 +13,5 @@ class Api::V1::RoomsController < Api::BaseController
|
||||||
respond_with rooms
|
respond_with rooms
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
class Api::V1::TracksController < Api::BaseController
|
module Api
|
||||||
|
module V1
|
||||||
|
class TracksController < Api::BaseController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
@ -11,3 +13,5 @@ class Api::V1::TracksController < Api::BaseController
|
||||||
respond_with tracks
|
respond_with tracks
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
class Ahoy::Store < Ahoy::Stores::ActiveRecordStore
|
module Ahoy
|
||||||
|
class Store < Ahoy::Stores::ActiveRecordStore
|
||||||
# customize here
|
# customize here
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
class ActiveRecord::Base
|
module ActiveRecord
|
||||||
|
class Base
|
||||||
mattr_accessor :shared_connection
|
mattr_accessor :shared_connection
|
||||||
@@shared_connection = nil
|
@@shared_connection = nil
|
||||||
|
|
||||||
|
|
@ -6,5 +7,6 @@ class ActiveRecord::Base
|
||||||
@@shared_connection || retrieve_connection
|
@@shared_connection || retrieve_connection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue