The personal finance app for everyone
Lint files to rubocop omakase standards
Rob Zolkos1cc9550c8000
diff --git a/Gemfile b/Gemfileindex fbd13fe2..e6f509e3 100644--- a/Gemfile+++ b/Gemfile@@ -32,10 +32,10 @@ gem "jbuilder"# Use Redis adapter to run Action Cable in productiongem "redis", ">= 4.0.1"-# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]-# gem "kredis"+ # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]+ # gem "kredis"-# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]+ # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]gem "bcrypt", "~> 3.1.7"# Windows does not include zoneinfo files, so bundle the tzinfo-data gemdiff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex 2bfc19d9..c9ea07f8 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -15,7 +15,7 @@ class ApplicationController < ActionController::Basedef authenticate_user_from_sessionUser.find_by(id: session[:user_id])- end+ enddef user_signed_in?current_user.present?diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rbindex 0534fc52..e6dc79ea 100644--- a/app/controllers/pages_controller.rb+++ b/app/controllers/pages_controller.rb@@ -1,6 +1,6 @@class PagesController < ApplicationControllerbefore_action :authenticate_user!-+def dashboardendenddiff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rbindex aa7dc142..be83ec3a 100644--- a/app/controllers/password_resets_controller.rb+++ b/app/controllers/password_resets_controller.rb@@ -1,6 +1,6 @@class PasswordResetsController < ApplicationControllerlayout "auth"-+def newend@@ -37,4 +37,3 @@ class PasswordResetsController < ApplicationControllerparams.require(:user).permit(:password, :password_confirmation)endend-diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rbindex 2c7a9325..cf28c08e 100644--- a/app/controllers/passwords_controller.rb+++ b/app/controllers/passwords_controller.rb@@ -18,4 +18,3 @@ class PasswordsController < ApplicationControllerparams.require(:user).permit(:password, :password_confirmation, :password_challenge).with_defaults(password_challenge: "")endend-diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rbindex b05379fe..cecad15a 100644--- a/app/controllers/registrations_controller.rb+++ b/app/controllers/registrations_controller.rb@@ -1,6 +1,6 @@class RegistrationsController < ApplicationControllerlayout "auth"-+def new@user = User.newend@@ -27,4 +27,3 @@ class RegistrationsController < ApplicationControllerparams.require(:user).permit(:name, :email, :password, :password_confirmation)endend-diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rbindex 711e1387..468ab024 100644--- a/app/controllers/sessions_controller.rb+++ b/app/controllers/sessions_controller.rb@@ -1,6 +1,6 @@class SessionsController < ApplicationControllerlayout "auth"-+def newend@@ -13,10 +13,9 @@ class SessionsController < ApplicationControllerrender :new, status: :unprocessable_entityendend-+def destroylogoutredirect_to root_path, notice: "You have signed out successfully."endend-diff --git a/app/models/current.rb b/app/models/current.rbindex 2d18a24e..73a9744b 100644--- a/app/models/current.rb+++ b/app/models/current.rb@@ -1,3 +1,3 @@class Current < ActiveSupport::CurrentAttributesattribute :user-end\ No newline at end of file+enddiff --git a/app/models/user.rb b/app/models/user.rbindex c2f72a03..5c8f05de 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -1,10 +1,10 @@class User < ApplicationRecordhas_secure_password-+belongs_to :familyvalidates :email, presence: true, uniqueness: true- normalizes :email, with: -> (email) { email.strip.downcase }+ normalizes :email, with: ->(email) { email.strip.downcase }generates_token_for :password_reset, expires_in: 15.minutes dopassword_salt&.last(10)diff --git a/config/initializers/generator.rb b/config/initializers/generator.rbindex 9dc40bc2..034fab6e 100644--- a/config/initializers/generator.rb+++ b/config/initializers/generator.rb@@ -1,3 +1,3 @@Rails.application.config.generators do |g|g.orm :active_record, primary_key_type: :uuid-end\ No newline at end of file+end