Sha256: 7a9f29fd16e87866313a6703ccac09635f2097fe1d67e9259bef276150399369

Contents?: true

Size: 876 Bytes

Versions: 28

Compression:

Stored size: 876 Bytes

Contents

# frozen_string_literal: true

# How to Start a Ruby on Rails 7 App With Hotwire and Tailwind CSS
# https://www.youtube.com/watch?v=7G0oWn2Gn5c

require 'pry'

self.local_template_path = File.join(File.dirname(__FILE__), 'rag_tailwind_hotwire')

gac 'base rails 7 image created'

add_controller('home', 'index')
route("get 'home/increment', as: :increment")
route("root 'home#index'")

copy_file 'home/controller.rb'     , 'app/controllers/home_controller.rb' , force: true
copy_file 'home/helper.rb'         , 'app/helpers/home_helper.rb'         , force: true
copy_file 'home/index.html'        , 'app/views/home/index.html.erb'      , force: true
copy_file 'home/increment.html.erb', 'app/views/home/increment.html.erb'  , force: true

after_bundle do
  gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mt-8 mx-auto'
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rails_app_generator-0.2.0 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.28 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.27 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.26 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.25 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.24 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.23 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.22 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.21 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.20 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.19 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.18 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.17 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.16 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.15 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.14 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.13 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.12 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.11 after_templates/rag_tailwind_hotwire.rb
rails_app_generator-0.1.10 after_templates/rag_tailwind_hotwire.rb