Class: Supabase::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Supabase::Generators::ViewsGenerator
- Defined in:
- lib/generators/supabase/views/views_generator.rb
Overview
‘rails g supabase:views` (FR-W13 / US-021).
Copies the gem’s default view templates into the host app so they can be customised. Standard Rails view resolution makes the host copies override the gem’s defaults because Rails resolves the host’s ‘app/views/` ahead of any engine-added view paths.
Files are copied byte-verbatim (no ERB processing) and routed through Thor’s ‘directory` action, which honours the standard overwrite prompt on re-run.
Instance Method Summary collapse
Instance Method Details
#copy_views ⇒ Object
28 29 30 |
# File 'lib/generators/supabase/views/views_generator.rb', line 28 def copy_views directory ".", "app/views/supabase/rails" end |