Skip to content

Commit

Permalink
Merge branch 'main' into story/16289_views
Browse files Browse the repository at this point in the history
  • Loading branch information
aslaymoore committed Feb 5, 2025
2 parents 289c7c2 + b97138a commit 09f5d3f
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 16 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ gem "bootstrap", "4.6.2"
gem "twitter-typeahead-rails", "0.11.1.pre.corejavascript"
gem "jquery-rails", "4.6.0"
gem "devise", "4.9.4"
gem "devise-guests", "0.8.3"
gem "geo_combine", "0.9.1"
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-guests (0.8.3)
devise
domain_name (0.6.20240107)
dotenv (3.1.2)
drb (2.2.1)
Expand Down Expand Up @@ -515,7 +513,6 @@ DEPENDENCIES
capistrano-rvm (= 0.1.2)
capybara (= 3.40.0)
devise (= 4.9.4)
devise-guests (= 0.8.3)
dotenv (= 3.1.2)
ed25519 (= 1.3.0)
geo_combine (= 0.9.1)
Expand Down
4 changes: 4 additions & 0 deletions app/models/acknowledged_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AcknowledgedUser < ApplicationRecord
has_many :acknowledgments, dependent: :destroy
validates :netid, presence: true, uniqueness: true
end
3 changes: 3 additions & 0 deletions app/models/acknowledgment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Acknowledgment < ApplicationRecord
belongs_to :acknowledged_users
end
5 changes: 3 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ class Application < Rails::Application
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"

# Set the time zone to Arizona (Phoenix)
config.time_zone = "America/Phoenix"
# config.eager_load_paths << Rails.root.join("extras")
end
end
9 changes: 5 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
concerns :searchable
end

devise_for :users
concern :exportable, Blacklight::Routes::Exportable.new

resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :exportable
end
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :exportable
end

# Status page for Pingdom
get '/status', to: 'application#status'
Expand Down
11 changes: 11 additions & 0 deletions db/migrate/20241219195633_create_acknowledged_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateAcknowledgedUsers < ActiveRecord::Migration[7.1]
def change
create_table :acknowledged_users do |t|
t.string :netid, null: false

t.timestamps
end
# Add a unique index to the netid column
add_index :acknowledged_users, :netid, unique: true
end
end
9 changes: 9 additions & 0 deletions db/migrate/20241219200631_create_acknowledgments.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class CreateAcknowledgments < ActiveRecord::Migration[7.1]
def change
create_table :acknowledgments do |t|
t.references :acknowledged_users, null: false, foreign_key: true

t.timestamps
end
end
end
27 changes: 21 additions & 6 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/fixtures/acknowledged_users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
10 changes: 10 additions & 0 deletions test/fixtures/acknowledgments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
7 changes: 7 additions & 0 deletions test/models/acknowledged_user_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "test_helper"

class AcknowledgedUserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
7 changes: 7 additions & 0 deletions test/models/acknowledgment_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "test_helper"

class AcknowledgmentTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

0 comments on commit 09f5d3f

Please sign in to comment.