+
<%= render @post %>
-
+
<%= link_to "Edit this post", edit_post_path(@post), class: "button" %>
-
+ <%= button_to "Summarise this post", summarize_post_path(@post), class: "button" %>
<%= button_to "Destroy this post", @post, method: :delete %>
diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc
index 19f60ef..f16cdbe 100644
--- a/config/credentials.yml.enc
+++ b/config/credentials.yml.enc
@@ -1 +1 @@
-R6pLqAgOKbr+y07Is0RC9w3wQKbkr2h2KZO4RNpGCPAaE+X9ZK6i3AdB0XYfDiBRfvtj05EhYDJ+Yr72985yeeRhnppVqkwNK1mWp+SGfY+KVvaKI7HFYG8igI0LthDAdsyeoA2+ElpZgjHCCLqz36gRKSY/KEbT/y0NukHdQRzsWFHwqgY85vQK9gRfDBpM72h4iPwb9TOPvMtJuVwfaIAdcDY0OqaQpTlFIGjh/bT9njHuO2h4mJ6dCBJYoFR0+8oCpd8hHWHtxeB4bsqKspfxrNvFTYEDQUnNwJEbQGNl14577rhEshQ2WfgUVFGzTzfEpzQmFZZJtnWhJuJbgVaxUwH5STUKWEWNY5/gD2vgp1oj0aUO6eiyOjz5YCkUieR2RV3hVF+yvOMb9NTt2EBYjJGeoqngzKi/Hq0xnLHIRmkoFHPvuC1RHn0Ucg1Nez4cmWppoOK3xm/b0H2lKsWi97vkkii38lqtfmmRFtsdXf4AvFOQ2NWpFlLKLwHT87/bU32XIzPObwErw/wv9irxrBMAlDDqOTqtqd6k3liddoNGCqUqHLxSC0IoH/G2tdg1PzoKBvtIVyjtctYtUnta1vgjpz727WCSSYO6gDTOxTkRmwc++DcBAzOJFkYSz8gFm02TjHaBhzXQeqw=--fmjiwM3a6xuvqqTn--wwZXJd1Zcs5AJV/lQbpCtw==
\ No newline at end of file
+v2C864ebli2Zlrpg1eDeEn17NBNNghNeT86hcfSfebENXaStabVwZbEfgHTryFxZcISmAZE4rjjdcJcFSqTNQwvUvLGWaT3efR8WyZ2QQP14OSwL8+hnHDpDXLJrQIDUOHFF+aLaN0/uh3UPbFkBIf6eYyDVO+PP3jxb5bXsNC5wkqiCA/gBDuZoCLGrX9Pnw2nPWcXptVV2H2PVcQOaJDUcJl4yFJBSU3/cV/f9yFPV70cfrqUxU5hSHxHqfSZUF9bh/A6AAkvVWBOgJIETA3DiIS0fvoMSRK5uQuDWsaY7fdc947QXw4VrdvFSQqAegzzDjNYgLtZIqQ2GHDhaRWnmsVGf7IqA/6tKb6jGIc0G/Y7Mtdoa4s177dAdrMaIr+PM4ZMMbACYq1WbQWZ1IfMttyId0tAlRRlVbAFPOhFxElCHEWWlq1t3xGwgFDQOyfzX3P2Cr1FCeVXJb8VwGz32CceOna6BnhzRns6mQKt6VI+uAh6T2Uoe+krtM1jb6XT5+u0qZ8jo9P/iibCeeBZr9JBQ4rE+8AIvHOIZNuq7nZQDAHL+s9WtVrkvVjpRQ28dpccbjyQFvXhjqFUFIVGDTITi31FaHcjNBMhZyMKLtv/c9ASojRFrkBoDTgulGq8v+uEnW/3HPNkW+X3fqRXtjt1URKS+Qz57J7JOWt/EvX/f7PCG--pBijWvzkta+/36PZ--LnhGLSczKJbXJk9B8MyGRQ==
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 9df6e47..f4dcd09 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -9,7 +9,7 @@ Rails.application.routes.draw do
resources :pages, only: [:index, :show]
end
end
-
+
resources :mailing_lists, only: [:index] do
collection do
post 'subscribe'
@@ -29,14 +29,20 @@ Rails.application.routes.draw do
get 'export', to: 'posts#export'
post 'import', to: 'posts#import'
resources :api_keys
- devise_for :users, controllers: {
- registrations: 'users/registrations',
+ devise_for :users, controllers: {
+ registrations: 'users/registrations',
confirmations: 'users/confirmations',
sessions: 'users/sessions'
}
get 'users/two_factor_authentication', to: 'users/two_factor_authentication#show'
post 'users/two_factor_authentication', to: 'users/two_factor_authentication#create'
- resources :posts
+
+ resources :posts do
+ member do
+ post :summarize
+ end
+ end
+
get '/feed', to: 'pubview#rss', as: 'rss', defaults: { format: 'rss' }
get '/feed/dispatches', to: 'pubview#dispatches_rss', as: 'dispatches_rss', defaults: { format: 'rss' }
get '/join', to: "pubview#join"
diff --git a/db/migrate/20241208061729_add_summary_to_posts.rb b/db/migrate/20241208061729_add_summary_to_posts.rb
new file mode 100644
index 0000000..6efb25e
--- /dev/null
+++ b/db/migrate/20241208061729_add_summary_to_posts.rb
@@ -0,0 +1,5 @@
+class AddSummaryToPosts < ActiveRecord::Migration[7.2]
+ def change
+ add_column :posts, :summary, :text
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index ddc1cd4..ffb94b5 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.2].define(version: 2024_10_09_212849) do
+ActiveRecord::Schema[7.2].define(version: 2024_12_08_061729) do
create_table "api_keys", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "key"
t.datetime "created_at", null: false
@@ -38,6 +38,7 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_09_212849) do
t.string "url"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.text "summary"
t.index ["post_type"], name: "index_posts_on_post_type"
t.index ["published_at"], name: "index_posts_on_published_at"
t.index ["slug"], name: "index_posts_on_slug", unique: true
--
2.39.5