Class: Messaged::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Messaged::Generators::ViewsGenerator
- Defined in:
- lib/generators/messaged/views/views_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_message_view_templates ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/generators/messaged/views/views_generator.rb', line 11 def copy_file \ 'messages/_form.html.erb', 'app/views/messaged/messages/_form.html.erb' copy_file \ 'messages/_message.html.erb', 'app/views/messaged/messages/_message.html.erb' copy_file \ 'messages/create.turbostream.erb', 'app/views/messaged/messages/create.turbostream.erb' copy_file \ 'messages/edit.html.erb', 'app/views/messaged/messages/edit.html.erb' copy_file \ 'messages/index.html.erb', 'app/views/messaged/messages/index.html.erb' copy_file \ 'messages/new.html.erb', 'app/views/messaged/messages/new.html.erb' copy_file \ 'messages/show.html.erb', 'app/views/messaged/messages/show.html.erb' end |
#copy_room_view_templates ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/generators/messaged/views/views_generator.rb', line 41 def copy_room_view_templates copy_file \ 'rooms/_form.html.erb', 'app/views/messaged/rooms/_form.html.erb' copy_file \ 'rooms/_room.html.erb', 'app/views/messaged/rooms/_room.html.erb' copy_file \ 'rooms/create.turbostream.erb', 'app/views/messaged/rooms/create.turbostream.erb' copy_file \ 'rooms/edit.html.erb', 'app/views/messaged/rooms/edit.html.erb' copy_file \ 'rooms/index.html.erb', 'app/views/messaged/rooms/index.html.erb' copy_file \ 'rooms/new.html.erb', 'app/views/messaged/rooms/new.html.erb' copy_file \ 'rooms/show.html.erb', 'app/views/messaged/rooms/show.html.erb' end |
#set_source_paths ⇒ Object
4 5 6 7 8 9 |
# File 'lib/generators/messaged/views/views_generator.rb', line 4 def set_source_paths @source_paths = [ File.('templates', __dir__), File.('../../../..', __dir__), ] end |