Sha256: bef4e473a4ecc77e755ed7b82e27573ea0e85a377022188f0eb6214d5542ddb0

Contents?: true

Size: 1.26 KB

Versions: 21

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

# Role management library with resource scoping
#
# exe/rag addons/rolify
#
# source: https://youtu.be/URDKxGn0pxo
# need to complete this profile by supporting resource level roles, go to 29 minutes on video
# source: https://youtu.be/URDKxGn0pxo?t=1101

self.local_template_path = File.dirname(__FILE__)

gac 'base rails 7 image created'

prepare_environment

after_bundle do
  scaffolds
  setup_customizations
  setup_db
end

def scaffolds
  add_scaffold('post', 'title', 'body:text')
end

def setup_customizations
  route("root 'home#index'")
  route("get 'home/quick_sign_in/:user_id', to: 'home#quick_sign_in', as: 'quick_sign_in'")
  route("get 'rolify/:id', to: 'rolify#show', as: 'rolify'")
  route("get 'rolify/:id/edit', to: 'rolify#edit', as: 'edit_rolify'")
  route("patch 'rolify/:id', to: 'rolify#update'")

  force_copy
  
  add_controller('home', 'index', 'quick_sign_in', 'bossy_boots', 'use_in_moderation', 'use_me', 'super_hero')

  directory "app/controllers"
  directory "app/models"
  directory "app/views"
  template  'app/views/layouts/application.html.erb'        , 'app/views/layouts/application.html.erb'
end

def setup_db
  template  'db/seeds.rb'                                   , 'db/seeds.rb'

  db_migrate
  db_seed
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.5 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.4 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.3 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.2 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.1 after_templates/addons/rolify/_.rb
rails_app_generator-0.3.0 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.43 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.42 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.41 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.40 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.39 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.38 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.37 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.36 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.35 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.34 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.33 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.32 after_templates/addons/rolify/_.rb
rails_app_generator-0.2.31 after_templates/addons/rolify/_.rb