-
-
Save sahidursuman/b08868722235f877e506b3ed8f55f033 to your computer and use it in GitHub Desktop.
Example of using the lightweight PixelPeeper API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def example_pictures_for(gear) | |
pp = PixelPeeper.new | |
if gear.pp_lens_id.present? | |
pp.examples(lens_id: gear.pp_lens_id) | |
elsif gear.pp_camera_id.present? | |
pp.examples(camera_id: gear.pp_camera_id) | |
else | |
[] | |
end.take(8) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment