Creates a method to read the image's exif data, from code that had been in the show action of the Images::EXIFController. (This is an AJAX response to show an image's exif header). The method reads the info off the actual file on the server; we do not store this info in the Image record.
PR makes the method available outside that controller, in other words.
I would like to use it in the edit obs interface.
Also clears up a method name that I hadn't understood:
rename Image::URL.file_name method to full_filepath
rename Image.local_file_name to full_filepath
These methods return the full path of the image on the server per environment, like this: /Users/nimmo/Documents/GitHub/developer-startup/mushroom-observer/public/images/orig/1663403.jpg
...which I would call a filepath. I had assumed no method existed to get this, due to the name.
And changes some Image class methods returning immutable hashes or arrays to frozen constants, e.g. Image.all_sizes -> Image::ALL_SIZES.
coverage: 94.426% (-0.003%) from 94.429%
when pulling 39b67a2b53e2ad9d2ec008583d824870a296dee0 on image-exif-data
into de869882727602161f602d499d47b7ec4d1f29f1 on main.
Creates a method to read the image's exif data, from code that had been in the
show
action of theImages::EXIFController
. (This is an AJAX response to show an image's exif header). The method reads the info off the actual file on the server; we do not store this info in the Image record.PR makes the method available outside that controller, in other words. I would like to use it in the edit obs interface.
Also clears up a method name that I hadn't understood:
Image::URL.file_name
method tofull_filepath
Image.local_file_name
tofull_filepath
These methods return the full path of the image on the server per environment, like this:
/Users/nimmo/Documents/GitHub/developer-startup/mushroom-observer/public/images/orig/1663403.jpg
...which I would call a filepath. I had assumed no method existed to get this, due to the name.And changes some Image class methods returning immutable hashes or arrays to frozen constants, e.g.
Image.all_sizes
->Image::ALL_SIZES
.