feat: implement flash messages system with auto-dismiss notifications
- Add flash message helper and styles for consistent notifications - Replace Devise error messages with flash-based notifications - Add dashboard page with event statistics - Configure SMTP settings for development and production - Update authentication controllers to use flash messages - Add JavaScript controller for auto-dismiss functionality
This commit is contained in:
@@ -34,6 +34,13 @@ Rails.application.configure do
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Configure mailer to use localhost:1025 for development
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: "localhost",
|
||||
port: 1025
|
||||
}
|
||||
|
||||
# Make template changes take effect immediately.
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
|
||||
@@ -60,14 +60,17 @@ Rails.application.configure do
|
||||
# Set host to be used by links generated in mailer templates.
|
||||
config.action_mailer.default_url_options = { host: "example.com" }
|
||||
|
||||
# Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
|
||||
# config.action_mailer.smtp_settings = {
|
||||
# user_name: Rails.application.credentials.dig(:smtp, :user_name),
|
||||
# password: Rails.application.credentials.dig(:smtp, :password),
|
||||
# address: "smtp.example.com",
|
||||
# port: 587,
|
||||
# authentication: :plain
|
||||
# }
|
||||
# Configure SMTP settings using environment variables
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: ENV.fetch("SMTP_ADDRESS", "smtp.example.com"),
|
||||
port: ENV.fetch("SMTP_PORT", 587),
|
||||
user_name: ENV.fetch("SMTP_USERNAME", ""),
|
||||
password: ENV.fetch("SMTP_PASSWORD", ""),
|
||||
authentication: ENV.fetch("SMTP_AUTHENTICATION", "plain"),
|
||||
domain: ENV.fetch("SMTP_DOMAIN", "example.com"),
|
||||
enable_starttls_auto: ENV.fetch("SMTP_STARTTLS", true)
|
||||
}
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
|
||||
@@ -12,9 +12,12 @@ Rails.application.routes.draw do
|
||||
# Defines the root path route ("/")
|
||||
root "pages#home"
|
||||
|
||||
# parties page
|
||||
get "parties", to: "parties#index", as: "parties"
|
||||
get "parties/:slug.:id", to: "parties#show", as: "party"
|
||||
# Pages
|
||||
get "dashboard", to: "pages#dashboard", as: "dashboard"
|
||||
|
||||
# Parties
|
||||
get "parties", to: "parties#index", as: "parties"
|
||||
get "parties/:slug.:id", to: "parties#show", as: "party"
|
||||
|
||||
# Routes for devise authentication Gem
|
||||
# Bind devise to user
|
||||
|
||||
Reference in New Issue
Block a user