This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ConsumerDemo | |
module Consumer | |
module Applications | |
class UnderwritingQuestionsController < ApplicationController | |
skip_before_action :authenticate_user! | |
# rubocop:disable Metrics/MethodLength | |
def index | |
application = DataStore.get_application(params.to_unsafe_hash[:application_id]) | |
if application.nil? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RecordActivityDecorator < SimpleDelegator | |
attr_accessor :activity_params | |
def initialize(object, activity_params) | |
@activity_params = activity_params | |
super(object) | |
end | |
def save | |
save_activity if super |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eversign embedded.js */ | |
var eversignTest = { | |
open: function (params) { | |
params.events = Object.assign({}, params.events); | |
// create iFrame | |
var iFrame = document.createElement('iframe'); | |
document.getElementById(params.containerID).appendChild(iFrame); | |
iFrame.src = params.url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note.where(notable_type: 'Establishment') | |
.joins(:note_type) | |
.group('notes.notable_id') | |
.count | |
.values | |
.max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note.where(notable_type: 'Establishment') | |
.joins(:note_type) | |
.group('notes.notable_id') | |
.count | |
.values | |
.max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Copyright (c) 2017-2019 SwiftComply | |
require 'rails_helper' | |
RSpec.describe 'Deleting an establishment pump out', type: :system do | |
include_context 'tenant' | |
let(:establishment) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Copyright (c) 2017-2019 SwiftComply | |
module InspectionActivity | |
extend ActiveSupport::Concern | |
def inspection_activity_params | |
inspection_activity_params = activity_params.dup | |
inspection_activity_params.merge(action: inspection_activity_action) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Copyright (c) 2017-2019 SwiftComply | |
require 'rails_helper' | |
RSpec.describe 'Create enforcement', type: :system do | |
include_context 'tenant' | |
let(:enforcement_type) { create(:enforcement_type, tenant: tenant) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_back_url | |
return if request.referer.blank? | |
if referer_path.include?(city_establishments_path) | |
session['gcd_back_url'] = referer_path | |
return | |
end | |
if referer_path.eql?(city_grease_traps_path) | |
session['gcd_back_url'] = city_grease_traps_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BackUrls | |
extend ActiveSupport::Concern | |
class Stack | |
attr_reader :stack | |
def initialize(stack_storage) | |
@stack = stack_storage['back_urls'] ||= Array.new | |
end |
NewerOlder