Skip to content

Instantly share code, notes, and snippets.

@joemasilotti
joemasilotti / AppDelegate.swift
Created April 21, 2025 18:33
Customize navigation bar on Hotwire Native iOS
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = .systemGreen
/// https://developer.apple.com/documentation/uikit/uinavigationbarappearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
@zealot128
zealot128 / README.md
Last active January 8, 2025 15:15
ActiveStorage migration guide and caveats from Carrierwave (similar starting point for Paperclip)

Migrate Carrierwave to ActiveStorage

Migrate, e.g. organisation.logo (Carrierwave "LogoUploader") to organisation.logo2 (ActiveStorage)

require 'migrate_attachment'
migrate_attachment!(
  klass: Organisation, 
  attachment_attribute: :logo, 
  carrierwave_uploader: LogoUploader,