This is a Rails application to play with different features of HTML Over the Wire.
The following software is required to work with the repository. This project currently works with:
bundle installrails importmap:installrails turbo:install stimulus:installrails db:create; db:seed- Open rails console and run
Developer.insert_fake_data 20 - Solid Queue is configured by default in new Rails 8 applications. But if you're running an earlier version, you can add it manually following these steps:
bundle add solid_queuebin/rails solid_queue:install
- To run the backend worker:
bin/jobs||bundle exec rake solid_queue:start
- First we need to create ImportMap for jQuery
- Run
bin/importmap pin jquery - This adds the jQuery library and its dependencies to the
config/importmap.rbfile. Note that we’re using a CDN location for the jQuery library, which grants access to the entire NPM catalog via Import Maps without requiring Node.js for package compilation. - Now to add JQuery:
import jQuery from "jquery"; jQuery('body').css('background-color', '#f2f2f2'); // This is how the jQuery works // You need to import like above // And then use that instead of '$'
- You will get some idea in : https://github.com/qisantanu/hotwired_app/pull/24/files
rails g stimulus turbomodal
The controller nme of timulus should be a word like 'notification', 'pagination' I have tried with 'notification_scroll' which is not working, may be the snake case is not valid.
Developer.insert_fake_dataNotification.bulk_create_for_testingNotification.fake_notification_stream
- Lazy loading using Hotwire
- Modal form open for the Create. Update Operation
- Custom pagination using Hotwire
- Sorting the data using Hotwire
- Integrate FontAwesome with the application
- Append, Update or Delete from HTML view via the Active record transaction callback
- Infinite scroll
This project utilises Yard for in-code documentation. Yard is a documentation generation tool for Ruby that provides a clean and consistent way to document your code.
To generate and view the documentation locally, follow these steps:
- Install Yard: It is part of the Gemfile in the development environment, after the
bundle install, it is ready to be used. - Generate Documentation: Run the following command to generate documentation for your project:
yar -o docsThis will create adocsdirectory with the generated documentation. - View Documentation Locally: - Open the
doc/index.htmlfile in your browser to browse the documentation. Or you can start the Yard server locally and access the documents.
You can customize Yard's behaviour by adding a .yardopts file in the root of your project. This file can contain various options and flags to control the documentation generation process. Refer to the Yard documentation for more details.