This application is built for complaint management system.
- Clone the Repo:
$ git clone "https://github.com/yash-m-agarwal/ComplaintSys-RoR"
-
Change directory into the folder named ComplaintSys-RoR
-
Install all the gems
$ bundle install
- Make migrations, Seed data into the database and Run the test server
$ rake db:migrate
$ rake db:seed
$ rails server
- The above steps starts the development server on localhost:3000. Go to
http://localhost:3000/
in your browser. It will automatically redirect you to the login page. Accordingly Signup or Login.
- Base Url:
http://localhost:3000
-
/login
- GET Request
- Returns a login form to authenticate the user. After authentication it redirects the user to a DashBoard.
/
route_url if user is a normal user. Where all the complaints generated by the user can be seen with a option Delete Complaint to delete a particular complaint. At the end a link/complaints/new
to add more complaints is provided./complaints
if user is admin. Where all the complaints generated by all the user can be seen. Each complaint has link Update Complaint/complaints/:id
to update the status of the complaint.
-
/signup
- GET Request
- Return a signup to create a new user.
Only normal user who complaints has access privileges to these views.
-
/
- GET Request
- All the complaints pertaining to a user can be seen. With a option of Delete Complaint to delete a complaint DELETE at
/complaint/:id
redirects to/
.
-
complaint/new
- GET Request
- Generates a form to file a complaint. After submitting the complaint it generates a POST request which redirects to
/
.
Only the admin user who resolves the complaints has the access privileges to these views. Apart from admin no one else can access this views.
-
/complaint
- GET Request
- Returns all the complaint objects if you are a resolver.
-
/complaint/:id
- GET Request
- Returns a complaint with :id and a Edit option to update it's status. To be updated by the admin.
-
/complaint/:id/edit
- GET Request
- Returns a complaint with :id and a form to update the status of the complaint.
-
complaint/:id
- POST Request
- Updates the status of the complaint and gets redirected to this URL.
There exists a one-to-many relationship between the User and a Complaint
- Title
- Description
- Status
- CreatedOn
- User (Foreign Key)
- First_Name
- Last_Name
- Password
- Reference to User
- Yash M Agarwal