Skip to content

Commit

Permalink
Minor change in rails app and RM run config
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 6, 2024
1 parent b614544 commit 5c203c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .idea/runConfigurations/Rails.xml

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

18 changes: 9 additions & 9 deletions gem/apps/rails.ru
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ gemfile(true) do
gem 'sqlite3'
end

# Pagy initializer
require 'pagy/extras/pagy'
require 'pagy/extras/items'
require 'pagy/extras/overflow'
Pagy::DEFAULT[:size] = [1, 4, 4, 1]
Pagy::DEFAULT[:items] = 10
Pagy::DEFAULT[:overflow] = :empty_page
Pagy::DEFAULT.freeze

# require 'rails/all' # too much stuff
require 'action_controller/railtie'
require 'active_record'
Expand Down Expand Up @@ -64,6 +55,15 @@ unless File.writable?(dir)
exit 1
end

# Pagy initializer
require 'pagy/extras/pagy'
require 'pagy/extras/items'
require 'pagy/extras/overflow'
Pagy::DEFAULT[:size] = [1, 4, 4, 1]
Pagy::DEFAULT[:items] = 10
Pagy::DEFAULT[:overflow] = :empty_page
Pagy::DEFAULT.freeze

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: "#{dir}/tmp/pagy-rails.sqlite3")
ActiveRecord::Schema.define do
create_table :posts, force: true do |t|
Expand Down

0 comments on commit 5c203c6

Please sign in to comment.