-
Notifications
You must be signed in to change notification settings - Fork 77
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
Developed Projects listing page #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some non blocking concerns.
class ProjectsController < ApplicationController | ||
def index | ||
if params["query"] | ||
@projects = Project.where("name LIKE ?", "%#{params['query']}%") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be really nice if we could use Ransack gem for the search part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keshavbiswa, I have added the Ransack gem. Can you review it once again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🥂
class ProjectsController < ApplicationController | ||
def index | ||
@q = Project.ransack(params[:q]) | ||
@projects = @q.result(distinct: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitjoshixyz That is from the image_submit_tag
. It will include the x and y params. I referred some posts. But I didn't find any solution to get rid of that.
PFA
https://stackoverflow.com/questions/21685559/rails-image-submit-tag-x-y-values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay its fine, not a blocker will check it later
* Code quality improvements * locales added * minor code changes * review changes added * review changes added
Current Code Coverage Percent of this PR:71.84 %Files having coverage below 100%
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@judis007 added some minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 . Can add some projects to seed.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request Template
Description
Developed the Project listing page which shows the projects and the number of hours logged for that project. It also includes a search bar to search for the projects.
Fixes #82
Type of change
How Has This Been Tested?
I tested locally in my browser whether the required functionality and design is working.
Checklist: