string literals; why not.

This commit is contained in:
2016-09-18 09:41:51 -05:00
parent 371a279d9e
commit 12332cc6bf
42 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class AccountsController < ApplicationController
before_action :set_account, only: [:show, :edit, :reveal, :update, :destroy]

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class AuthController < ApplicationController
skip_before_action :verify_session

View File

@ -1,2 +1,3 @@
# frozen_string_literal: true
module ApplicationHelper
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class Account < ApplicationRecord
serialize :password, CryptSerializer
end

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
class AppConfig < Settingslogic
source "#{Rails.root}/config/application.yml"
namespace Rails.env

View File

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'openssl'
require 'base64'

View File

@ -1,2 +1,3 @@
# frozen_string_literal: true
json.extract! account, :id, :username, :password, :home, :site, :created_at, :updated_at
json.url account_url(account, format: :json)

View File

@ -1 +1,2 @@
# frozen_string_literal: true
json.array! @accounts, partial: 'accounts/account', as: :account

View File

@ -1 +1,2 @@
# frozen_string_literal: true
json.partial! "accounts/account", account: @account