Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/admin/applications.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ActiveAdmin.register Application do
menu parent: "User Mangement", priority: 1
menu parent: "User Management", priority: 1
# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
#
Expand Down Expand Up @@ -34,7 +34,7 @@
filter :lodging_selection, as: :select, collection: -> { Lodging.all.map { |lapp| [lapp.description, lapp.description]}.sort }
filter :partner_registration_id, as: :select, collection: -> { PartnerRegistration.all.map { |papp| [papp.description, papp.id]}.sort }
filter :subscription, as: :select
filter :conf_year, as: :select
filter :applications_conf_year, as: :select, label: "Conf Year"

controller do
before_action :load_index_batch_data, only: [:index]
Expand Down
2 changes: 1 addition & 1 deletion app/admin/users.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ActiveAdmin.register User do
menu parent: "User Mangement", priority: 3
menu parent: "User Management", priority: 3

# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
Expand Down
7 changes: 6 additions & 1 deletion app/models/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ def self.ransackable_associations(auth_object = nil)
end

def self.ransackable_attributes(auth_object = nil)
["accessibility_requirements", "birth_year", "city", "conf_year", "country", "created_at", "email", "email_confirmation", "first_name", "food_restrictions", "gender", "how_did_you_hear", "id", "id_value", "last_name", "lodging_selection", "lottery_position", "offer_status", "offer_status_date", "partner_first_name", "partner_last_name", "partner_registration_id", "partner_registration_selection", "phone", "result_email_sent", "special_lodging_request", "state", "street", "street2", "subscription", "updated_at", "user_id", "workshop_selection1", "workshop_selection2", "workshop_selection3", "zip"]
["accessibility_requirements", "applications_conf_year", "birth_year", "city", "conf_year", "country", "created_at", "email", "email_confirmation", "first_name", "food_restrictions", "gender", "how_did_you_hear", "id", "id_value", "last_name", "lodging_selection", "lottery_position", "offer_status", "offer_status_date", "partner_first_name", "partner_last_name", "partner_registration_id", "partner_registration_selection", "phone", "result_email_sent", "special_lodging_request", "state", "street", "street2", "subscription", "updated_at", "user_id", "workshop_selection1", "workshop_selection2", "workshop_selection3", "zip"]
end

# Disambiguate conf_year when joining associated tables in Ransack searches.
ransacker :applications_conf_year do |parent|
parent.table[:conf_year]
end

HOW_DID_YOU_HEAR = ["---", "Word of Mouth", "Magazine Advertisement", "Online Advertisement", "Newspaper Advertisement", "Other"]
Expand Down
2 changes: 1 addition & 1 deletion app/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.ransackable_attributes(auth_object = nil)
end


scope :current_conference_payments, -> { where('conf_year = ? ', ApplicationSetting.get_current_app_year) }
scope :current_conference_payments, -> { where(arel_table[:conf_year].eq(ApplicationSetting.get_current_app_year)) }

def manual_payment_decimal
if self.transaction_type == "ManuallyEntered"
Expand Down
2 changes: 1 addition & 1 deletion spec/models/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
describe '.ransackable_attributes' do
it 'returns the correct attributes' do
expected_attributes = [
"accessibility_requirements", "birth_year", "city", "conf_year", "country",
"accessibility_requirements", "applications_conf_year", "birth_year", "city", "conf_year", "country",
"created_at", "email", "email_confirmation", "first_name", "food_restrictions",
"gender", "how_did_you_hear", "id", "id_value", "last_name", "lodging_selection",
"lottery_position", "offer_status", "offer_status_date", "partner_first_name",
Expand Down
Loading