Ajax Assignment
Develop a scaffolded application with the following
criteria:
- The model has 2-3 required attributes and 2-3 optional
attributes.
- The model has a boolean attribute that indicates whether the
item has been marked (true) or not marked (false). Have this
attribute set to false by default.
Modify the scaffold so that it has the following behaviors:
- Only the required attributes appear initially on the form.
The user can then select a link for the optional attributes.
After selecting the link, the optional links appear in
the form without reloading the page.
- After a user creates or updates a record, use Ajax so that a
confirmation message appears on the current page (instead of
redirecting to the show page).
- When a user deletes a record, have the record in the table
removed without reloading the whole page.
- On the index page, display a toggle link that allows the
user to toggle between "marked" and "not marked". Clicking the link
should involve a remote call and the display should be updated
without reloading the whole page.
- Maintain a count of marked records and have it displayed
prominently on the index page. When the marked status of a
record has changed, update the count without reloading the page.
Apply a visual effect so that the user notices the change.
Finally, change the root path so that it is directed to the
index page of your scaffolded model.
Submit your zipped application to the COL course website.