Name:
In this laboratory, we have the task of completing the unfinished Ajax implementation from the workshop.
This application is a basic simulation of Twitter.
- Tweet: represents a normal tweet.
- Hashtag: represents the tags that a tweet can have.
- User: represents the user.
- Tag: It is the n-n relationship between hashtag and tweet
The app includes the following features:
- Basic CRUD operations for tweets.
- User login (devise).
- Automatic creation of hashtags.
Make sure you have the following requirements installed:
- Ruby 3.2.0
- Node 18 or higher
- Rails 7.0.0 or higher
- Postgres 14 or higher
Follow these steps to install the application:
- Clone the repository.
- Run bundle install.
- Run rails db:create.
- Run rails db:migrate.
The following requirements should be met, as discussed in the workshop:
- The search functionality in the navbar should work as intended, displaying tweets associated with the searched text using Ajax.
- Users should only be able to delete their own tweets, implemented with CanCanCan.
- User roles should be implemented in the application, with admin users having privileged access and the ability to manage all aspects of the app.
In addition to the mentioned requirements, you may consider the following optional enhancements:
- Add CanCanCan to allow users to delete only their own tweets.
- Create user roles (admin and regular user), where the admin role has the ability to perform all actions.