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

Add recent jobs api endpoint #89

Merged
merged 1 commit into from
Jun 9, 2016
Merged

Add recent jobs api endpoint #89

merged 1 commit into from
Jun 9, 2016

Conversation

ksk5280
Copy link
Contributor

@ksk5280 ksk5280 commented Jun 9, 2016

Add endpoint that is scoped to showing only jobs from the last two months. The endpoint is "/api/v1/recent_jobs"

@rrgayhart @hhoopes @NickyBobby @brennanholtzclaw
closes #87

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 90.426% when pulling f414b0f on 87-recent-jobs into fb281fd on master.

@@ -3,6 +3,7 @@ class Job < ActiveRecord::Base
before_save { |tech| tech.downcase_tech }

scope :by_date, -> { order(posted_date: :desc) }
scope :last_two_months, -> { where("posted_date >= ?", 2.months.ago).order(posted_date: :desc) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice scope!

@NickyBobby
Copy link
Contributor

This all looks pretty good to me. Unless someone has anything to say I'm gonna close it. @cheljoh @ksk5280

@NickyBobby NickyBobby merged commit 406fa4d into master Jun 9, 2016
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.

Job Index Endpoint
3 participants