aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/models/active_storage/filename.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use require_dependency inside Active StorageEugene Kenny2018-02-141-0/+2
| | | | | | | | | | | | | | | Active Storage is an engine which means its models, jobs and controllers are autoloaded by Rails rather than Ruby. Unfortunately this means it's subject to the same gotchas as applications, including this one: http://guides.rubyonrails.org/v5.1.4/autoloading_and_reloading_constants.html#when-constants-aren-t-missed-qualified-references On Ruby < 2.5, constants nested under classes can't be autoloaded by Rails if a top level constant already exists with the same name. To avoid clashing with constants defined in users' applications or gems, we can use `require_dependency` to ensure that the nested constants are loaded before they're used.
* Fix `blob.service_url` for supports string or nil `:filename` option.Jason Lee2018-02-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | - Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`. - Add `ActiveStorage::Filename.wrap` method. before: ```rb blob.service_url(filename: ActiveStorage::Filename.new("new.txt")) blob.service_url(filename: "new.txt") => NoMethodError: undefined method `parameters' for "new.txt":String params = {} blob.service_url(filename: params[:filename]) => NoMethodError: undefined method `parameters' for nil:NilClass ``` after: ```rb blob.service_url(filename: "new.txt") blob.service_url(filename: nil) ```
* Exclude ActiveStorage::Filename{#parameters,::Parameters} from API docs [ci ↵George Claghorn2017-12-131-1/+1
| | | | skip]
* Add missing word [ci skip]George Claghorn2017-09-201-1/+1
|
* Flesh out ActiveStorage::Filename docsGeorge Claghorn2017-09-201-6/+14
|
* Update Active Storage docs [ci skip]Yoshiyuki Hirano2017-08-301-5/+13
|
* Enable links in Active Storage docs [ci skip]Yoshiyuki Hirano2017-08-261-1/+1
|
* Encode Content-Disposition filenames according to RFC 2231George Claghorn2017-08-211-0/+4
| | | | Closes #30134.
* Rename ActiveStorage::Filename#extname to extension_with_delimiterGeorge Claghorn2017-08-201-9/+11
|
* Use frozen string literal in Active StorageKoichi ITO2017-08-121-0/+2
|
* Add 'activestorage/' from commit '3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58'Rafael Mendonça França2017-07-311-0/+49
git-subtree-dir: activestorage git-subtree-mainline: 0d58e7e478e79c2d6b2a39a4444d2a17a903b2a6 git-subtree-split: 3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58