Skip to content

Instantly share code, notes, and snippets.

@zealot128
Last active June 4, 2018 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zealot128/2e3cf090fce01239082bc8ba4bdf4854 to your computer and use it in GitHub Desktop.
Save zealot128/2e3cf090fce01239082bc8ba4bdf4854 to your computer and use it in GitHub Desktop.
Rails 5.2. be_success -> be_successful

Rails 5.2. be_success -> be_successful

using ag or fgrep

sed -i 's/be_success$/be_successful/g' `ag be_success$ spec -l`

image_tag resolver

image_tag Rails.root.join(...) Can't resolve image into URL: undefined method to_model' for #Pathname:0x00000008f9c290

Rails.application.routes.draw do
  resolve("Pathname") { |object, options| object.to_s }

image_tag object.some_carrierwave_model

Rails.application.routes.draw do
  resolve("YourUploaderName") { |object, options| object.url }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment