Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encyclopedia Implementation #286

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

naomiamayaa
Copy link

•	index: Lists all articles or filters them based on a search parameter. It uses the Article.search method, which 
             implies that the Article model has a class method search that performs the query.
•	show: Finds and displays a single article based on the id parameter from the URL.
•	new: Initializes a new instance of Article for use in a form for creating a new article.
•	create: Attempts to create a new Article with the parameters submitted from the form. If successful, it redirects to 
             the article’s show page with a success notice; if not, it re-renders the new article form with errors.
•	edit: Finds an existing article to be edited, likely to be used in a form for editing the article.
•	update: Attempts to update an existing Article with the submitted parameters from the edit form. If successful, it 
             redirects to the article’s show page with a success notice; if not, it re-renders the edit form with errors.
•	destroy: Deletes the article identified by the id parameter and redirects to the list of articles with a success notice.
•	article_params (private): A strong parameters method that whitelists which parameters are allowed when creating 
            or updating an article. This is a security feature to prevent mass assignment vulnerabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant