Axel Kee

Joined

740 Experience
0 Lessons Completed
1 Question Solved

Activity

Mind to elaborate more on your issue? What happens if you didn't set config.assets.compile = true ? Does the assets not served? Is the stylesheet/ javascript tag correctly placed in views?

If you are using ActiveStorage, check out this gem : https://github.com/igorkasyanchuk/active_storage_validations

You can use square aspect validation on this gem : validates :avatar, aspect_ratio: :square

Posted in How do I do the following in a better way?

Hmm maybe

articles = Article.where(category: params[:category])
articles = articles.where(author_id: author.id) if author.present?

# use your articles here...

Posted in Running only a part of a huge (2000+) specs suite

You can tag specs, say for specs related to checkout flow, you can tag them as "checkout" like this :

# specs/discount_checkout_spec.rb
it "should checkout with discount", :checkout do
    # some test code here
end

then you can specify rspec to only run tests are tagged with :checkout like this : rspec spec --tag checkout

If you are using Homebrew and Mac for the MySQL installation, try this : https://stackoverflow.com/a/44147346

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.