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

Search functionality and Test fix #5

Merged
merged 5 commits into from Jan 30, 2024
Merged

Search functionality and Test fix #5

merged 5 commits into from Jan 30, 2024

Conversation

eidun10
Copy link
Owner

@eidun10 eidun10 commented Jan 30, 2024

  • Placed table of articles in a partial. This is because we want to use the same in the search view(article/search.html.erb). Also added toggle to sort the table in ascending/descending order
  • Replaced template dropdown in navbar with search bar. The logic of the search works to perform a case-insensitive search on both title and content fields of our Articles
    Note: app/views/articles/search.html.erb is currently the same as app/views/articles/search.html.erb, but this could change in the future

Other:

  • Added input field for Author when creating an article
  • Modified test/controllers/articles_controller_test.rb to not use fixtures files but create article(s) variable within its test scope. It helps so it does not affect the model tests

@eidun10 eidun10 merged commit b2a46ca into main Jan 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant