source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/check_answers_controller.rb
Ruby
mit
19
main
801
module Citizens class CheckAnswersController < CitizenBaseController def index legal_aid_application.check_citizen_answers! unless legal_aid_application.checking_citizen_answers? end def continue record_acceptance legal_aid_application.complete_non_passported_means! unless legal_aid_app...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/gather_transactions_controller.rb
Ruby
mit
19
main
1,570
module Citizens class GatherTransactionsController < CitizenBaseController class TrueLayerWorkerError < StandardError; end skip_back_history_for :index def index I18n.locale = session[:locale] return if worker_working? if worker_errors.any? @error_decoder = TrueLayerErrorDecode...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/resend_link_requests_controller.rb
Ruby
mit
19
main
957
module Citizens class ResendLinkRequestsController < ApplicationController before_action :update_locale def show; end def update ScheduledMailing.send_now!( mailer_klass: ResendLinkRequestMailer, mailer_method: :notify, legal_aid_application_id: legal_aid_application.id, ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/additional_accounts_controller.rb
Ruby
mit
19
main
1,235
module Citizens class AdditionalAccountsController < CitizenBaseController def index legal_aid_application.update!(has_offline_accounts: nil) legal_aid_application.reset_to_applicant_entering_means! if legal_aid_application.use_ccms? legal_aid_application.applicant_enter_means! unless legal_aid_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/legal_aid_applications_controller.rb
Ruby
mit
19
main
2,172
module Citizens class LegalAidApplicationsController < CitizenBaseController before_action :authenticate_with_devise, only: :index # User passes in the Secure Id at the start of the journey. If login succeeds, they # are redirected to index where the first page is displayed. def index; end def s...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/citizen_base_controller.rb
Ruby
mit
19
main
929
module Citizens class CitizenBaseController < FlowBaseController include ApplicationFromSession before_action :authenticate_with_devise before_action :check_not_complete before_action :set_cache_buster around_action :switch_locale private def skip_out_of_hours? true end def...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/banks_controller.rb
Ruby
mit
19
main
776
module Citizens class BanksController < CitizenBaseController include Devise::Controllers::Rememberable def index remember_me(current_applicant) @ordered_banks = ordered_banks end def create @ordered_banks = ordered_banks if params[:provider_id].present? session[:pro...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/accounts_controller.rb
Ruby
mit
19
main
247
module Citizens class AccountsController < CitizenBaseController def index @applicant_banks = current_applicant.bank_providers.collect do |bank_provider| ApplicantAccountPresenter.new(bank_provider) end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/citizens/consents_controller.rb
Ruby
mit
19
main
1,074
module Citizens class ConsentsController < CitizenBaseController def show @legal_aid_application.reset_to_applicant_entering_means! if @legal_aid_application.use_ccms? @form = Applicants::OpenBankingConsentForm.new(model: legal_aid_application) end def update @form = Applicants::OpenBan...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin_users/omniauth_callbacks_controller.rb
Ruby
mit
19
main
908
# This controller handles an admin user's return from the Oauth2 authentication # Note that you may need to restart the server to apply changes to this file. module AdminUsers class OmniauthCallbacksController < Devise::OmniauthCallbacksController def entra_id admin = AdminUser.from_omniauth(auth_data) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin_users/mock_auth_sessions_controller.rb
Ruby
mit
19
main
598
module AdminUsers class MockAuthSessionsController < MockAuthSessionsBaseController protected def mock_username Rails.configuration.x.admin_omniauth.mock_username end def mock_password Rails.configuration.x.admin_omniauth.mock_password end def mock_auth_session_params params...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/submitted_applications_reports_controller.rb
Ruby
mit
19
main
458
module Admin class SubmittedApplicationsReportsController < AdminBaseController include Pagy::Backend DEFAULT_PAGE_SIZE = 10 # GET /admin/submitted_applications_report def show @pagy, @applications = pagy( LegalAidApplication.submitted_applications.includes(:ccms_submission).reorder("c...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/site_banners_controller.rb
Ruby
mit
19
main
980
module Admin class SiteBannersController < AdminBaseController def index @messages = Announcement.all end def show @announcement = announcement end def new @announcement = Announcement.new end def create @announcement = Announcement.new(form_params[:announcement]...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/admin_base_controller.rb
Ruby
mit
19
main
926
module Admin class AdminBaseController < ApplicationController before_action :check_vpn_ipaddr, :authenticate_admin_user!, :set_cache_buster, :set_scope protected def check_vpn_ipaddr redirect_to error_path(:access_denied) unless ip_addr_authorised?(current_ip_address) end def current_ip_ad...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/ccms_queues_controller.rb
Ruby
mit
19
main
1,225
module Admin class CCMSQueuesController < AdminBaseController def index @in_progress = CCMS::Submission.where.not(aasm_state: %w[completed abandoned lead_application_pending]).order(created_at: :desc) @pending = CCMS::Submission.where(aasm_state: :lead_application_pending).order(created_at: :desc).map...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/settings_controller.rb
Ruby
mit
19
main
1,292
module Admin class SettingsController < AdminBaseController def show @form = Settings::SettingForm.new(model: setting) end def update @form = Settings::SettingForm.new(form_params.merge(model: setting)) @ccms_setting_changing = ccms_setting_changed? if @form.save CCMS::Tur...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/reports_controller.rb
Ruby
mit
19
main
4,182
module Admin class ReportsController < AdminBaseController def index reports end def download_application_details_report expires_now respond_to do |format| format.csv do data = application_details_report || Reports::MIS::ApplicationDetailsReport.new.run send_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/legal_aid_applications_controller.rb
Ruby
mit
19
main
1,951
module Admin class LegalAidApplicationsController < AdminBaseController include Pagy::Backend DEFAULT_PAGE_SIZE = 10 def index @pagy, @applications = pagy( LegalAidApplication.latest, limit: params.fetch(:page_size, DEFAULT_PAGE_SIZE), size: 5, ) end def sear...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/providers_controller.rb
Ruby
mit
19
main
314
module Admin class ProvidersController < AdminBaseController def index if params[:firm_id] == "0" @providers = Provider.order(:username) @firm = nil else @firm = Firm.find(params[:firm_id]) @providers = @firm.providers.order(:username) end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/feedback_controller.rb
Ruby
mit
19
main
333
module Admin class FeedbackController < AdminBaseController include Pagy::Backend DEFAULT_PAGE_SIZE = 10 # GET /admin/feedback def show @pagy, @feedback = pagy( Feedback.order(created_at: :desc), limit: params.fetch(:page_size, DEFAULT_PAGE_SIZE), size: 5, ) e...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/legal_aid_applications/submissions_controller.rb
Ruby
mit
19
main
1,651
module Admin module LegalAidApplications class SubmissionsController < AdminBaseController before_action :authenticate_admin_user! before_action :load_history, only: %i[download_xml_response download_xml_request] def show legal_aid_application end def download_xml_response ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/admin/roles/permissions_controller.rb
Ruby
mit
19
main
632
module Admin module Roles class PermissionsController < ApplicationController before_action :authenticate_admin_user! def show firm permissions end def update firm.update!(firm_params) redirect_to admin_root_path, notice: t(".notice") end privat...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/providers_controller.rb
Ruby
mit
19
main
601
module V1 class ProvidersController < ApiController ALLOWED_ACTIONS = %w[accept reject].freeze def update provider = Provider.find_by(id: params[:id]) action = params[:provider][:action] if provider.nil? || ALLOWED_ACTIONS.exclude?(action) render "", status: :bad_request else ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/statement_of_cases_controller.rb
Ruby
mit
19
main
1,979
module V1 class StatementOfCasesController < ApiController include MalwareScanning ATTACHMENT_TYPE = "statement_of_case".freeze def create return head :not_found unless legal_aid_application file = form_params[:file] malware_scan = malware_scan_result(file) return render json: ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/bank_statements_controller.rb
Ruby
mit
19
main
728
module V1 class BankStatementsController < BaseBankStatementsController include MalwareScanning def initialize super @attachment_type = "bank_statement_evidence" @attachment_type_capture = /^#{@attachment_type}_(\d+)$/ end private # can be shared with v1 bank statement controlle...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/attachments_controller.rb
Ruby
mit
19
main
505
module V1 class AttachmentsController < ApiController def update return head :not_found unless attachment attachment.update!(attachment_type: attachment_params[:type]) head :ok rescue ActiveRecord::RecordInvalid head :bad_request end private def attachment return @at...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/dismiss_announcements_controller.rb
Ruby
mit
19
main
386
module V1 class DismissAnnouncementsController < ApiController def create provider = current_provider ProviderDismissedAnnouncement.create!(provider:, announcement:) redirect_to return_to_param end private def return_to_param params.expect(:return_to) end def announcem...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/workers_controller.rb
Ruby
mit
19
main
313
module V1 class WorkersController < ApiController def show render json: { status: worker["status"], errors: worker["errors"], } end private def worker @worker ||= Sidekiq::Status.get_all(worker_id) end def worker_id params[:id] end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/legal_aid_applications_controller.rb
Ruby
mit
19
main
398
module V1 class LegalAidApplicationsController < ApiController def destroy legal_aid_application = LegalAidApplication.find_by(id: params[:id]) if legal_aid_application legal_aid_application.discard legal_aid_application.scheduled_mailings.map(&:cancel!) render "", status: :ok...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/base_bank_statements_controller.rb
Ruby
mit
19
main
1,648
module V1 class BaseBankStatementsController < ApiController include MalwareScanning attr_reader :attachment_type, :attachment_type_capture def create return head :not_found unless legal_aid_application file = form_params[:file] malware_scan = malware_scan_result(file) return r...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/uploaded_evidence_collections_controller.rb
Ruby
mit
19
main
2,066
module V1 class UploadedEvidenceCollectionsController < ApiController include MalwareScanning def create return head :not_found unless legal_aid_application file = form_params[:file] malware_scan = malware_scan_result(file) return render json: { error: original_file_error_for(:file_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/v1/partners/bank_statements_controller.rb
Ruby
mit
19
main
775
module V1 module Partners class BankStatementsController < BaseBankStatementsController def initialize super @attachment_type = "part_bank_state_evidence" @attachment_type_capture = /^#{@attachment_type}_(\d+)$/ end private # can be shared with v1 bank statement con...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/address_selections_base_controller.rb
Ruby
mit
19
main
1,367
module Providers class AddressSelectionsBaseController < ProviderBaseController include AddressHandling def show return redirect_to back_path unless address.postcode @addresses = address_lookup.result titleize_addresses filter_addresses(building_number_name) if building_number_name ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/previous_references_controller.rb
Ruby
mit
19
main
553
module Providers class PreviousReferencesController < ProviderBaseController reviewed_by :legal_aid_application, :check_provider_answers def show @form = Applicants::PreviousReferenceForm.new(model: applicant) end def update @form = Applicants::PreviousReferenceForm.new(form_params) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/end_of_applications_controller.rb
Ruby
mit
19
main
343
module Providers class EndOfApplicationsController < ProviderBaseController authorize_with_policy_method :show_submitted_application? def show; end def update # Behaves like save as draft - but doesn't set the application to draft draft_selected? ? redirect_to(draft_target_endpoint) : go_for...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/open_banking_guidances_controller.rb
Ruby
mit
19
main
783
module Providers class OpenBankingGuidancesController < ProviderBaseController def show legal_aid_application.reset_from_use_ccms! if legal_aid_application.use_ccms? legal_aid_application.provider_confirm_applicant_eligibility! form end def update return continue_or_draft if draf...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/has_other_proceedings_controller.rb
Ruby
mit
19
main
1,773
module Providers class HasOtherProceedingsController < ProviderBaseController def show @form = LegalAidApplications::HasOtherProceedingsForm.new(model: legal_aid_application) end def update @form = LegalAidApplications::HasOtherProceedingsForm.new(form_params) @form.draft! if params[:dr...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/received_benefit_confirmations_controller.rb
Ruby
mit
19
main
1,122
module Providers class ReceivedBenefitConfirmationsController < ProviderBaseController include ApplicantDetailsCheckable include DWPOutcomeHelper def show @form = Providers::ReceivedBenefitConfirmationForm.new(model: dwp_override) end def update return continue_or_draft if draft_sele...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/check_capital_answers_controller.rb
Ruby
mit
19
main
919
module Providers class CheckCapitalAnswersController < ProviderBaseController def show legal_aid_application.check_non_passported_means! unless legal_aid_application.checking_non_passported_means? end def update if cfe_call_required? redirect_to(problem_index_path) && return unless ch...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/providers_controller.rb
Ruby
mit
19
main
612
module Providers class ProvidersController < ProviderBaseController include OfficeAddressHandling legal_aid_application_not_required! def show @provider = current_provider @office_address = office_address if @provider.selected_office.present? @ccms_user_details = ccms_user["ccmsUserDet...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/about_the_financial_assessments_controller.rb
Ruby
mit
19
main
1,393
module Providers class AboutTheFinancialAssessmentsController < ProviderBaseController def show redirect_to start_after_means_complete_path if legal_aid_application.provider_entering_merits? || legal_aid_application.provider_assessing_means? @applicant = legal_aid_application.applicant end d...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/legal_aid_applications_controller.rb
Ruby
mit
19
main
2,223
module Providers class LegalAidApplicationsController < ProviderBaseController include Pagy::Backend legal_aid_application_not_required! before_action :set_scope, :load_announcements, only: %i[in_progress search submitted voided] DEFAULT_PAGE_SIZE = 20 def index; end def submitted a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/use_ccms_employment_controller.rb
Ruby
mit
19
main
401
module Providers class UseCCMSEmploymentController < ProviderBaseController def index @legal_aid_application.use_ccms!(use_ccms_reason) end private def use_ccms_reason if @legal_aid_application.applicant.self_employed? :applicant_self_employed elsif @legal_aid_application.app...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/means_reports_controller.rb
Ruby
mit
19
main
642
module Providers class MeansReportsController < ProviderBaseController include GroverOptionable authorize_with_policy_method :show_submitted_application? def show @cfe_result = @legal_aid_application.cfe_result @manual_review_determiner = CCMS::ManualReviewDeterminer.new(@legal_aid_applicati...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/no_national_insurance_numbers_controller.rb
Ruby
mit
19
main
734
module Providers class NoNationalInsuranceNumbersController < ProviderBaseController include ApplicantDetailsCheckable include BenefitCheckSkippable include DWPOutcomeHelper def show @applicant = legal_aid_application.applicant if @applicant.national_insurance_number? redirect_to...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/has_evidence_of_benefits_controller.rb
Ruby
mit
19
main
1,387
module Providers class HasEvidenceOfBenefitsController < ProviderBaseController include ApplicantDetailsCheckable include DWPOutcomeHelper def show @form = LegalAidApplications::HasEvidenceOfBenefitForm.new(model: dwp_override) passporting_benefit end def update return continue...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/applicant_details_controller.rb
Ruby
mit
19
main
738
module Providers class ApplicantDetailsController < ProviderBaseController reviewed_by :legal_aid_application, :check_provider_answers def show @form = Applicants::BasicDetailsForm.new(model: applicant) end def update @form = Applicants::BasicDetailsForm.new(form_params) render :sh...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/bank_statements_controller.rb
Ruby
mit
19
main
2,882
module Providers class BankStatementsController < ProviderBaseController skip_back_history_for :list before_action :set_form, only: %i[show update destroy] def show legal_aid_application.set_transaction_period legal_aid_application.provider_assess_means! unless checking_answers? end ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/transactions_controller.rb
Ruby
mit
19
main
2,121
module Providers class TransactionsController < ProviderBaseController def show if transaction_type.disregarded_benefit? && !disregarded_state_benefits_list redirect_to(problem_index_path) && return end transaction_type bank_transactions end def update set_selection...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/merits_reports_controller.rb
Ruby
mit
19
main
498
module Providers class MeritsReportsController < ProviderBaseController include GroverOptionable authorize_with_policy_method :show_submitted_application? def show if params.key?(:debug) render "show", layout: "pdf" else html = render_to_string "show", layout: "pdf" p...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/resumes_controller.rb
Ruby
mit
19
main
1,055
module Providers class ResumesController < ProviderBaseController skip_back_history_for :show skip_provider_step_update_for :show def show redirect_to url_for_application(legal_aid_application) end private def url_for_application(legal_aid_application) name = if legal_aid_applicat...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/delegated_confirmation_controller.rb
Ruby
mit
19
main
243
module Providers class DelegatedConfirmationController < ProviderBaseController def index; end private def set_legal_aid_application legal_aid_application.update!(provider_step: :substantive_applications) end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/has_national_insurance_numbers_controller.rb
Ruby
mit
19
main
663
module Providers class HasNationalInsuranceNumbersController < ProviderBaseController reviewed_by :legal_aid_application, :check_provider_answers def show @form = Applicants::HasNationalInsuranceNumberForm.new(model: applicant) end def update @form = Applicants::HasNationalInsuranceNumbe...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/check_passported_answers_controller.rb
Ruby
mit
19
main
1,118
module Providers class CheckPassportedAnswersController < ProviderBaseController include ::DurationLogger def show @proceeding = legal_aid_application.lead_proceeding @applicant = legal_aid_application.applicant @address = @applicant.addresses.first legal_aid_application.check_passpor...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/uploaded_evidence_collections_controller.rb
Ruby
mit
19
main
1,775
module Providers class UploadedEvidenceCollectionsController < ProviderBaseController def show DocumentCategoryAnalyser.call(legal_aid_application) @service = UploadedEvidence::PopulateUploadFormService.call(self) copy_instance_variables end def update @service = UploadedEvidence:...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/confirm_offices_controller.rb
Ruby
mit
19
main
1,725
module Providers class ConfirmOfficesController < ProviderBaseController legal_aid_application_not_required! helper_method :firm def show initialize_page_history next_page = determine_where_next form redirect_to next_page unless next_page.nil? end def update if form...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/applicants_controller.rb
Ruby
mit
19
main
1,290
module Providers class ApplicantsController < ProviderBaseController legal_aid_application_not_required! def new @form = Applicants::BasicDetailsForm.new(model: applicant) end def create @form = Applicants::BasicDetailsForm.new(form_params) if save_continue_or_draft(@form) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/means_assessment_results_controller.rb
Ruby
mit
19
main
667
module Providers class MeansAssessmentResultsController < ProviderBaseController KNOWN_RESULTS = %w[eligible ineligible contribution_required partially_eligible].freeze def show @cfe_result = legal_aid_application.cfe_result handle_unknown @details = ManualReviewDetailer.call(legal_aid_appl...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/open_banking_consents_controller.rb
Ruby
mit
19
main
751
module Providers class OpenBankingConsentsController < ProviderBaseController def show legal_aid_application.reset_from_use_ccms! if legal_aid_application.use_ccms? legal_aid_application.provider_confirm_applicant_eligibility! @form = LegalAidApplications::OpenBankingConsentForm.new(model: legal...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/bank_transactions_controller.rb
Ruby
mit
19
main
919
module Providers class BankTransactionsController < ProviderBaseController def remove_transaction_type bank_transaction.update!(transaction_type: nil, meta_data: nil) flash[:hash] = success_hash respond_to do |format| format.js format.html { redirect_back_or_to(providers_root_p...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/delete_controller.rb
Ruby
mit
19
main
877
module Providers class DeleteController < ProviderBaseController def show @scope = :delete set_redirect_url redirect_to home_path if @legal_aid_application.discarded? end def destroy @legal_aid_application.discard @legal_aid_application.scheduled_mailings.map(&:cancel!) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/confirm_non_means_tested_applications_controller.rb
Ruby
mit
19
main
687
module Providers class ConfirmNonMeansTestedApplicationsController < ProviderBaseController include ApplicantDetailsCheckable include CFEResultMockable include BenefitCheckSkippable include DWPOutcomeHelper def show reset_confirm_dwp_status!(legal_aid_application) details_checked! unl...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/proceedings_types_controller.rb
Ruby
mit
19
main
1,488
module Providers class ProceedingsTypesController < ProviderBaseController # GET /provider/applications/:legal_aid_application_id/proceedings_types def index proceeding_types excluded_codes redirect_to providers_legal_aid_application_has_other_proceedings_path(legal_aid_application) if proce...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/omniauth_callbacks_controller.rb
Ruby
mit
19
main
909
module Providers class OmniauthCallbacksController < Devise::OmniauthCallbacksController def entra_id if auth_data_valid? @provider = Provider.from_omniauth(auth_data) flash[:notice] = I18n.t "devise.omniauth_callbacks.signed_in" sign_in_and_redirect @provider, event: :authentication...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/cookies_controller.rb
Ruby
mit
19
main
556
module Providers class CookiesController < ProviderBaseController legal_aid_application_not_required! def show @form = Providers::CookiesForm.new(model: current_provider) end def update @form = Providers::CookiesForm.new(form_params) if @form.save @successfully_saved = true...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/check_merits_answers_controller.rb
Ruby
mit
19
main
1,191
module Providers class CheckMeritsAnswersController < ProviderBaseController def show @form = LegalAidApplications::ConfirmSeparateRepresentationForm.new(model: legal_aid_application) legal_aid_application.check_merits_answers! unless legal_aid_application.checking_merits_answers? end def co...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/application_confirmations_controller.rb
Ruby
mit
19
main
243
module Providers class ApplicationConfirmationsController < ProviderBaseController def show; end private def set_legal_aid_application legal_aid_application.update!(provider_step: :check_provider_answers) end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/check_client_details_controller.rb
Ruby
mit
19
main
706
module Providers class CheckClientDetailsController < ProviderBaseController include DWPOutcomeHelper def show checking_dwp_status!(legal_aid_application) applicant partner force_dwp_required_details_check! end def update continue_or_draft end private def a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/mock_auth_sessions_controller.rb
Ruby
mit
19
main
782
module Providers class MockAuthSessionsController < MockAuthSessionsBaseController protected def mock_username Rails.configuration.x.omniauth_entraid.mock_username end def mock_password Rails.configuration.x.omniauth_entraid.mock_password end def mock_auth_session_params par...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/outgoings_summary_controller.rb
Ruby
mit
19
main
1,226
module Providers class OutgoingsSummaryController < ProviderBaseController def index setup end def create return continue_or_draft if draft_selected? if uncategorized_transactions? setup render :index else go_forward end end private def s...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/auth_controller.rb
Ruby
mit
19
main
440
module Providers class AuthController < ApplicationController def failure flash[:error] = I18n.t("devise.omniauth_callbacks.failure", kind: failure_params[:strategy]&.humanize || "Identity manager", reason: failure_params[:message]&.humanize || "Authentication failure!") redirect_to error_path(:access...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/task_lists_controller.rb
Ruby
mit
19
main
738
module Providers class TaskListsController < ApplicationController before_action :update_locale include Authorizable include ApplicationDependable skip_back_history_for :show skip_provider_step_update_for :show def show legal_aid_application @task_list = ::TaskList::StartPageCol...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/limitations_controller.rb
Ruby
mit
19
main
2,145
module Providers class LimitationsController < ProviderBaseController def show @form = LegalAidApplications::EmergencyCostOverrideForm.new(model: legal_aid_application) legal_aid_application.enter_applicant_details! unless no_state_change_required? end def update remove_partner_if_non_m...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/check_provider_answers_controller.rb
Ruby
mit
19
main
3,418
module Providers class CheckProviderAnswersController < ProviderBaseController review_as :legal_aid_application, :check_provider_answers def index return redirect_to_client_completed_means if legal_aid_application.provider_assessing_means? set_variables legal_aid_application.check_applican...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/sessions_controller.rb
Ruby
mit
19
main
322
module Providers class SessionsController < Devise::SessionsController def destroy session["signed_out"] = true session["feedback_return_path"] = destroy_provider_session_path super end protected def after_sign_out_path_for(_resource_or_scope) new_feedback_path end end en...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/offline_accounts_controller.rb
Ruby
mit
19
main
894
module Providers class OfflineAccountsController < ProviderBaseController helper_method :attributes def show @form = SavingsAmounts::OfflineAccountsForm.new(model: savings_amount) end def update @form = SavingsAmounts::OfflineAccountsForm.new(form_params) render :show unless save_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/address_lookups_base_controller.rb
Ruby
mit
19
main
572
module Providers class AddressLookupsBaseController < ProviderBaseController def show @form = Addresses::AddressLookupForm.new(model: address) @correspondence_address_choice = legal_aid_application.applicant.correspondence_address_choice end def update @form = Addresses::AddressLookupFo...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/client_completed_means_controller.rb
Ruby
mit
19
main
799
module Providers class ClientCompletedMeansController < ProviderBaseController def show define_action_list end def update continue_or_draft end private def define_action_list @action_list = %w[income_outgoings] @action_list += %w[sort_transactions dependants capital] u...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/merits_task_lists_controller.rb
Ruby
mit
19
main
847
module Providers class MeritsTaskListsController < ProviderBaseController before_action :merits_tasks def show; end def update return continue_or_draft if draft_selected? || @legal_aid_application.legal_framework_merits_task_list.can_proceed? @merits_task_list.errors.add(:task_list, :incomp...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/applicant_bank_accounts_controller.rb
Ruby
mit
19
main
1,218
module Providers class ApplicantBankAccountsController < ProviderBaseController def show applicant_accounts @form = SavingsAmounts::OfflineSavingsAccountsForm.new(model: savings_amount) end def update @form = SavingsAmounts::OfflineSavingsAccountsForm.new(form_params) reset_accou...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/income_summary_controller.rb
Ruby
mit
19
main
1,229
module Providers class IncomeSummaryController < ProviderBaseController def index setup end def create return continue_or_draft if draft_selected? if uncategorized_transactions? setup render :index else go_forward end end private def setu...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/select_offices_controller.rb
Ruby
mit
19
main
1,897
module Providers class SelectOfficesController < ProviderBaseController legal_aid_application_not_required! def show initialize_page_history @form = Providers::OfficeForm.new(model: current_provider) end def update @form = Providers::OfficeForm.new(form_params) if @form.vali...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/applicant_employed_controller.rb
Ruby
mit
19
main
747
module Providers class ApplicantEmployedController < ProviderBaseController def index @applicant = applicant @legal_aid_application.reset_from_use_ccms! if @legal_aid_application.use_ccms? @form = Applicants::EmployedForm.new(model: applicant) end def create @form = Applicants::Em...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/change_of_names_controller.rb
Ruby
mit
19
main
991
module Providers class ChangeOfNamesController < ProviderBaseController def show @proceeding = legal_aid_application.proceedings.order(:created_at).last form end def update return continue_or_draft if draft_selected? @proceeding = legal_aid_application.proceedings.order(:created_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/capital_introductions_controller.rb
Ruby
mit
19
main
353
module Providers class CapitalIntroductionsController < ProviderBaseController include ApplicantDetailsCheckable def show if legal_aid_application.passported? details_checked! unless details_checked? legal_aid_application.provider_enter_means! end end def update con...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/submitted_applications_controller.rb
Ruby
mit
19
main
472
module Providers class SubmittedApplicationsController < ProviderBaseController include TransactionTypeSettable authorize_with_policy_method :show_submitted_application? helper_method :display_employment_income? helper_method :link_banner_display def show @source_application = @legal_aid_a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/confirm_client_declarations_controller.rb
Ruby
mit
19
main
661
module Providers class ConfirmClientDeclarationsController < ProviderBaseController def show @form = LegalAidApplications::ConfirmClientDeclarationForm.new(model: legal_aid_application) end def update @form = LegalAidApplications::ConfirmClientDeclarationForm.new(form_params) unless sa...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/review_and_print_applications_controller.rb
Ruby
mit
19
main
758
module Providers class ReviewAndPrintApplicationsController < ProviderBaseController include TransactionTypeSettable include OfficeAddressHandling authorize_with_policy_method :show_submitted_application? helper_method :display_employment_income? def show @source_application = @legal_aid_a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/provider_base_controller.rb
Ruby
mit
19
main
989
module Providers class ProviderBaseController < FlowBaseController before_action :authenticate_provider! before_action :set_cache_buster before_action :update_locale include Appointable include ApplicationDependable include Draftable include Authorizable include Reviewable::Controller ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/address_manuals_base_controller.rb
Ruby
mit
19
main
587
module Providers class AddressManualsBaseController < ProviderBaseController def show @form = Addresses::AddressForm.new(model: address) end def update @form = Addresses::AddressForm.new(form_params) render :show unless save_continue_or_draft(@form) end private def address_a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/use_ccms_controller.rb
Ruby
mit
19
main
424
module Providers class UseCCMSController < ProviderBaseController def show @legal_aid_application.use_ccms!(use_ccms_reason) unless @legal_aid_application.use_ccms? end private def use_ccms_reason case request.referer when providers_legal_aid_application_open_banking_consents_url(@le...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/substantive_applications_controller.rb
Ruby
mit
19
main
696
module Providers class SubstantiveApplicationsController < ProviderBaseController def show @form = LegalAidApplications::SubstantiveApplicationForm.new(model: legal_aid_application) end def update @form = LegalAidApplications::SubstantiveApplicationForm.new(form_params) if save_continue...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/email_addresses_controller.rb
Ruby
mit
19
main
533
module Providers class EmailAddressesController < ProviderBaseController def show @form = Applicants::EmailForm.new(model: applicant) end def update @form = Applicants::EmailForm.new(form_params) render :show unless save_continue_or_draft(@form) end private def applicant ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/correspondence_address/care_ofs_controller.rb
Ruby
mit
19
main
794
module Providers module CorrespondenceAddress class CareOfsController < ProviderBaseController prefix_step_with :correspondence_address reviewed_by :legal_aid_application, :check_provider_answers def show @form = Addresses::CareOfForm.new(model: address) end def update ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/correspondence_address/choices_controller.rb
Ruby
mit
19
main
1,072
module Providers module CorrespondenceAddress class ChoicesController < ProviderBaseController prefix_step_with :correspondence_address reviewed_by :legal_aid_application, :check_provider_answers def show @form = Addresses::ChoiceForm.new(model: applicant) legal_aid_application....
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/correspondence_address/selections_controller.rb
Ruby
mit
19
main
564
module Providers module CorrespondenceAddress class SelectionsController < AddressSelectionsBaseController prefix_step_with :correspondence_address reviewed_by :legal_aid_application, :check_provider_answers private def address applicant.address || applicant.build_address(country_c...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/correspondence_address/manuals_controller.rb
Ruby
mit
19
main
596
module Providers module CorrespondenceAddress class ManualsController < AddressManualsBaseController prefix_step_with :correspondence_address reviewed_by :legal_aid_application, :check_provider_answers private def location "correspondence" end def address_attributes ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/correspondence_address/lookups_controller.rb
Ruby
mit
19
main
414
module Providers module CorrespondenceAddress class LookupsController < AddressLookupsBaseController prefix_step_with :correspondence_address reviewed_by :legal_aid_application, :check_provider_answers private def address applicant.address || applicant.build_address(location: "corr...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/home_address/manuals_controller.rb
Ruby
mit
19
main
796
module Providers module HomeAddress class ManualsController < AddressManualsBaseController prefix_step_with :home_address reviewed_by :legal_aid_application, :check_provider_answers private def build_address applicant.addresses&.where(location: "home")&.destroy_all Address....
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
app/controllers/providers/home_address/lookups_controller.rb
Ruby
mit
19
main
751
module Providers module HomeAddress class LookupsController < AddressLookupsBaseController prefix_step_with :home_address reviewed_by :legal_aid_application, :check_provider_answers private def build_address applicant.addresses&.where(location: "home")&.destroy_all Address....