Commit Graph

45 Commits

Author SHA1 Message Date
Akhil G Krishnan
2e35046f61 Fix the wrong markdown hightlighting [skip ci] 2023-09-28 20:14:35 +05:30
zzak
dd89f600f7
🔗 Remove RDoc auto-link from Rails module everywhere 2023-06-23 10:49:30 +09:00
zzak
722d4f6582
Unlink Rails constant from READMEs 2023-05-29 15:14:44 +09:00
zzak
f8544410a2 Use stable guides link for package READMEs
E.g.: These show up here:
https://api.rubyonrails.org/files/actioncable/README_md.html
2023-02-04 09:01:00 +09:00
John Bampton
2f699c51ce Fix word case. html -> HTML 2022-09-18 04:21:22 +10:00
David Heinemeier Hansson
82e4432058
Javascript generator option with choices (#43160)
* Switch to a single controller option for choosing JavaScript approach

* Remove remnants of webpacker specific work within Rails

* No longer used

* Missing space

* Raise if unknown option is passed

* Style

* Use latest versions

* Make channels setup generic to all node setups

* Make Action Text installer work with any node package manager

* Explaining variables are not useless

* Rubocop pleasing

* Don't rely on Rails.root

Tests don't like it!

* Rubocopping

* Assume importmap

* No longer relevant

* Another cop

* Style

* Correct installation notice

* Add dependencies for action cable when adding a channel

* Fix paths to be relative to generator

* Just go straight to yarn, forget about binstub

* Fix tests

* Fixup installer, only yarn once

* Test generically with run

* Style

* Fix reference and reversibility

* Style

* Fix test

* Test pinning dependencies

* Remove extra space

* Add more tests

* Use latest dependencies

* Relegated this to controllers

* Refactor ChannelGenerator + more tests

Use a uniform level of abstraction
2021-09-04 11:53:57 +02:00
David Heinemeier Hansson
6c96e1cd7b
Move Active Storage JS to ESM and drop Babel transpiling (#42895)
* Move to ESM and drop Babel transpiling

* Make the activestorage JS directly available through the asset pipeline as a precompiled asset

* Use example with direct attachment

* Explain that direct reference is possible

* Active Storage JS is a module

* Retain umd asset for backwards compatibility, add ESM file in addition

* Explain how to use activestorage.esm with importmap

* Use untranspiled activestorage inclusion

* Don't repeat terser options
2021-07-28 15:17:13 -04:00
Santiago Bartesaghi
1416679d2d Add docs for CDN in front of ActiveStorage [ci skip]
Co-authored-by: Bruno Vezoli <brunvezoli@hotmail.com>
Co-authored-by: Juan Eduardo Roig <jeroig@gmail.com>
2021-06-03 14:03:10 -03:00
Christian Schmidt
6cd184ff0f
Use image/jpeg instead of non-standard image/jpg 2021-03-05 13:14:11 -05:00
Rafael Mendonça França
077c66d5d6
Rename master to main in all code references 2021-01-19 20:46:33 +00:00
Ross Kaffenberger
04cbaa1475 Use ES module syntax for application.js.tt and docs
This change swaps the CommonJS require() syntax in the Webpacker
application.js pack template file and in documentation examples with ES
module import syntax.

Benefits of this change include:

Provides continuity with the larger frontend community: Arguably, one of
the main draws in adopting Webpacker is its integration with Babel to
support ES module syntax. For a fresh Rails install with Webpacker, the
application.js file will be the first impression most Rails developers
have with webpack and Webpacker.  Most of the recent documentation and
examples they will find online for using other libraries will be based
on ES module syntax.

Reduces confusion: Developers commonly add ES imports to their
application.js pack, typically by following online examples, which means
mixing require() and import statements in a single file. This leads to
confusion and unnecessary friction about differences between require()
and import.

Embraces browser-friendliness: The ES module syntax forward-looking and
is meant to be supported in browsers. On the other hand, require()
syntax is synchronous by design and not browser-supported as CommonJS
originally was adopted in Node.js for server-side JavaScript. That
webpack supports require() syntax is merely a convenience.

Encourages best practices regarding optimization: webpack can statically
analyze ES modules and "tree-shake", i.e., strip out unused exports from
the final build (given certain conditions are met, including
`sideEffects: false` designation in package.json).
2020-06-16 15:12:12 -04:00
Jonathan Fleckenstein
dfb5a82b25
Active Storage: allow serving files by proxying 2020-05-11 16:21:58 -04:00
Abhay Nikam
bdfffd1355 Update the Rails mailing list URLs to new discuss discourse URL [ci skip] 2020-04-02 22:00:28 +05:30
Haroon Ahmed
db1ae8cbb4 remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
Takayuki Nakata
b08d428ba0 Fix typo in activestorage README [ci skip]
`a ActionDispatch::Http::UploadedFile object` ->
`an ActionDispatch::Http::UploadedFile object`
2019-09-18 09:19:22 +09:00
Kasper Timm Hansen
0fc1397784
Merge pull request #35559 from ashishprajapati/ashishprajapati/important_textual_improvements
Added missing guide links in documentation and minor wording fix
2019-03-09 22:54:21 +01:00
ashishprajapati
e3ef12b310 Added missing guide links in README documentation and minor wording fix [ci skip] 2019-03-10 03:17:01 +05:30
Abhay Nikam
476abd403b Updated links from http to https in guides, docs, etc 2019-03-09 16:43:47 +05:30
George Claghorn
c1e949e9e6 Prefer ImageProcessing's resize_to_limit macro over resize_to_fit
Don't upsize images smaller than the specified dimensions.
2019-01-24 11:46:42 -05:00
Javan Makhmali
385d31d209 Minimize boilerplate setup code for JavaScript libraries 2019-01-16 16:15:43 -05:00
Javan Makhmali
86b489e3d6 Move all npm packages to @rails scope
Fixes #33083
2019-01-10 11:01:57 -05:00
Donnie Propst
b4e827d80a Point to requiring the ASt engine in the installation instructions [ci skip] 2018-10-08 11:26:51 -04:00
Janko Marohnić
eef0bd0c0a
Recommend using :resize_to_fit after all 2018-04-23 21:04:35 +02:00
Janko Marohnić
ca12968587
Use ImageProcessing gem for ActiveStorage variants
ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and
implements an interface for common image resizing and processing. This
is the canonical image processing gem recommended in [Shrine], and
that's where it developed from. The initial implementation was extracted
from Refile, which also implements on-the-fly transformations.

Some features that ImageProcessing gem adds on top of MiniMagick:

  * resizing macros
    - #resize_to_limit
    - #resize_to_fit
    - #resize_to_fill
    - #resize_and_pad
  * automatic orientation
  * automatic thumbnail sharpening
  * avoids the complex and inefficient MiniMagick::Image class
  * will use "magick" instead of "convert" on ImageMagick 7

However, the biggest feature of the ImageProcessing gem is that it has
an alternative implementation that uses libvips. Libvips is an
alternative to ImageMagick that can process images very rapidly (we've
seen up 10x faster than ImageMagick).

What's great is that the ImageProcessing gem provides the same interface
for both implementations. The macros are named the same, and the libvips
implementation does auto orientation and thumbnail sharpening as well;
only the operations/options specific to ImageMagick/libvips differ. The
integration provided by this PR should work for both implementations.

The plan is to introduce the ImageProcessing backend in Rails 6.0 as the
default backend and deprecate the MiniMagick backend, then in Rails 6.1
remove the MiniMagick backend.
2018-04-18 17:46:25 +02:00
Yoshiyuki Hirano
c1d7df2538 Add cloud service's links to README of Active Storage [ci skip] 2017-12-22 06:40:24 +09:00
Fatos Morina
37cf9b3466 Fix typos and add a few suggestions 2017-11-28 19:27:43 +01:00
Oleg
2ab561932e how do we install active_storage? [skip ci] 2017-10-06 12:54:23 -07:00
Ryuta Kamizono
2402dd5588 Merge pull request #30628 from yhirano55/add_local_option_to_message_form
Add local option to Message form [ci skip]
2017-09-17 22:29:02 +09:00
Yoshiyuki Hirano
7d14bda3a7 Fix file missing in activestorage's example code [ci skip]
* File.open("~/face.jpg") raise error:
  `Errno::ENOENT: No such file or directory @ rb_sysopen - ~/face.jpg`
2017-09-17 21:00:23 +09:00
Yoshiyuki Hirano
194a93385b Add local option to Message form [ci skip]
* MessagesController redirects to `GET /message/:id`.
* It looks it don't expect XHR request.
* `form_with` behaves for XHR by default.
* I've added `local: true` option to `form_with`.
2017-09-17 17:44:04 +09:00
Xavier Noria
ae87217382 minor tweaks in Active Storage after a walkthrough 2017-08-15 18:50:46 +02:00
Rafael Mendonça França
1eb8f88028 Remove unnedded Active Storage installation steps
Active Storage was now merged to master and it is automatically
installed in a new application.
2017-08-11 17:19:04 -04:00
Ryuta Kamizono
de80aa6412 Microsoft Azure --> Microsoft Azure Storage [ci skip] 2017-08-12 01:20:23 +09:00
Anton Khamets
7c89948c41 Extend image_tag to accept ActiveStorage Attachments and Variants (#30084)
* Extend image_tag to accept ActiveStorage's Attachments and Variants

* Flip resolve_image_source around

* Add tests for the new use-cases of image_tag

* Remove the higher-level test

* Update image_tag documentation

* Add error states into the test suite

* Re-raise polymorhic_url's NoMethodError as ArgumentError

* delegate_missing_to will raise DelegationError instead of NoMethodError
2017-08-07 09:38:51 -05:00
Vipul A M
1fe55e94b7 Pass over Active Storage readme [ci skip] (#30086) 2017-08-06 13:44:45 +05:30
yuuji.yaginuma
70d0e53db7 Fix repository URL [ci skip]
changed `rails/activestorage` to `rails/rails`.
2017-08-05 08:25:29 +09:00
Mike Gunderloy
c5ae4e52e3 Tweak requires
Omit azure-core (it's required by azure-storage), remove require:false to match other points.
2017-08-02 20:47:58 -05:00
Mike Gunderloy
d4f0b10319 Use release azure-core gem 2017-08-02 20:32:09 -05:00
Mike Gunderloy
0f2d3fb6da Update README.md 2017-08-02 19:55:10 -05:00
Mike Gunderloy
8aa742ff52 Add Azure gems to README 2017-08-02 18:29:51 -05:00
Bryan Lim
f927de6fef Add Azure to readme
previously https://github.com/rails/activestorage/pull/86
2017-08-02 09:57:19 +08:00
David Heinemeier Hansson
b807b5b7e8 Cut down on installation advice 2017-08-01 16:28:05 -05:00
David Heinemeier Hansson
c622e532fc Drop README terms no longer relevant 2017-08-01 16:26:13 -05:00
David Heinemeier Hansson
90a8e0698d Use config/storage.yml as part of the skeleton and loading 2017-07-31 15:57:37 -05:00
Rafael Mendonça França
9330d01ada Add 'activestorage/' from commit '3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58'
git-subtree-dir: activestorage
git-subtree-mainline: 0d58e7e478e79c2d6b2a39a4444d2a17a903b2a6
git-subtree-split: 3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58
2017-07-31 15:21:22 -04:00