Sprinkle frozen string literal & Indentation Fix (#150)

* Avoid extra string alocation as join will always return string

* Fix indentation

* Sprinkle frozen string literal true
This commit is contained in:
Akshay Birajdar
2019-10-16 12:22:30 +05:30
committed by Sojan Jose
parent 59e9fbd336
commit a1452d7d89
18 changed files with 63 additions and 36 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class AccountBuilder
include CustomExceptions::Account
@@ -59,7 +61,6 @@ class AccountBuilder
else
raise UserErrors.new({errors: @user.errors})
end
end
def email_to_name(email)
@@ -67,5 +68,4 @@ class AccountBuilder
name.split(".").map {|n| n.capitalize }.join(" ")
end
end

View File

@@ -58,7 +58,7 @@ class ApplicationController < ActionController::Base
def render_record_invalid(exception)
render json: {
message: "#{exception.record.errors.full_messages.join(", ")}"
message: exception.record.errors.full_messages.join(", ")
}, status: :unprocessable_entity
end

View File

@@ -2,7 +2,6 @@ class ConfirmationsController < Devise::ConfirmationsController
skip_before_action :require_no_authentication, raise: false
skip_before_action :authenticate_user!, raise: false
def create
begin
@confirmable = User.find_by(confirmation_token: params[:confirmation_token])