Update gems#50
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds Turbo Native support to the Rails application by creating platform-specific layout templates and updating gem dependencies. The changes enable the app to provide a tailored mobile experience when accessed through Turbo Native shells on iOS/Android.
- Added Turbo Native detection and variant setting in the application controller
- Created new mobile-optimized layout templates that remove navigation elements for native apps
- Updated Puma gem to version 7.0
- Cleaned up commented code in the main application layout
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/controllers/application_controller.rb | Added Turbo Native detection logic and variant setting |
| app/views/layouts/application.turbo_native.html.erb | New layout template for Turbo Native apps |
| app/views/layouts/application.html+turbo_native.erb | Alternative naming convention for Turbo Native layout |
| app/views/layouts/application.html.erb | Removed commented navigation and search form code |
| Gemfile | Updated Puma gem from version 6.0 to 7.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <!DOCTYPE html> | ||
| <html data-turbo-native> | ||
| <head> | ||
| <title>Trackpractice</title> | ||
| <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
| <%= csrf_meta_tags %> | ||
| <%= csp_meta_tag %> | ||
| <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> | ||
| <%= javascript_importmap_tags %> | ||
| <%= favicon_link_tag %> | ||
| </head> | ||
|
|
||
| <body> | ||
| <%= turbo_frame_tag 'flash-messages' do %> | ||
| <%= render "shared/flash" %> | ||
| <% end %> | ||
|
|
||
| <%= yield %> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
This layout file is identical to application.html+turbo_native.erb. Consider removing one of these duplicate files to avoid maintenance issues. Rails will automatically use the html+turbo_native variant when the turbo_native variant is set.
| <!DOCTYPE html> | |
| <html data-turbo-native> | |
| <head> | |
| <title>Trackpractice</title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <%= csrf_meta_tags %> | |
| <%= csp_meta_tag %> | |
| <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> | |
| <%= javascript_importmap_tags %> | |
| <%= favicon_link_tag %> | |
| </head> | |
| <body> | |
| <%= turbo_frame_tag 'flash-messages' do %> | |
| <%= render "shared/flash" %> | |
| <% end %> | |
| <%= yield %> | |
| </body> | |
| </html> |
No description provided.