Black Friday Sale 2023!
GoRails
by
5M ago
It's hard to believe it's holiday season already and 2023 is almost over. Our Black Friday sale is live and we do this every year as a way to show our appreciation for all the support the Ruby on Rails community has given us over the years. We've grown from a 1 person company to 3 to continue growing and supporting the Ruby on Rails community. Kent, Collin, and I want to say thanks for all your support that makes this possible and we promise to continue creating the best Rails education and tools we can. Here are the Black Friday sales for 2023: 36% off GoRails with the yearly plan - Get the d ..read more
Visit website
Rails World 2023: Powerful Rails Features You Might Not Know Talk Slides
GoRails
by
7M ago
I gave a talk at Rails World 2023 in Amsterdam on Powerful Rails Features You Might Not Know. If all you've got is a hammer, everything looks like a nail. In tech, there is a constant stream of new features being added every day. Keeping up with the latest Ruby on Rails functionality can help you and your team be far more productive than you might normally be. In this talk, we walk through a bunch of lesser known or easy to miss features in Ruby on Rails that you can use to improve your skills ..read more
Visit website
Patching Models for Ransack 4.0.0: Extending ActiveRecord for Gem Compatibility
GoRails
by
8M ago
Here at GoRails, we are running ActiveAdmin to power our administration area and we recently upgraded the version which we were running to version 3.0.0. The ActiveAdmin engine has a dependency on Ransack and along with upgrading to the latest version of ActiveAdmin that brought along an upgrade of Ransack to version 4.0.0. Going up a major version usually introduces breaking changes and sure enough this was our experience. As noted in the Ransack CHANGELOG for the version 4.0.0 release there is indeed a breaking change introduced: Require explicit allowlisting of attributes and associations ..read more
Visit website
How to test OmniAuth Params
GoRails
by
1y ago
OmniAuth provides some tooling for mocking OAuth requests in your test suite. This is handy because your tests don't have to redirect to a production OAuth provider like Twitter, authenticate with real credentials, and then handle the response. Instead, you can set test mode in OmniAuth and then add a mock OAuth provider. This will allow your tests to skip the production OAuth process and simulate it in your test environment. One problem is testing additional params you might pass to OmniAuth. For testing, you normally just request the callback URL for the mock request. If you test only with t ..read more
Visit website
Bundler default gem dependency error
GoRails
by
1y ago
Have you seen the following error? You have already activated uri 0.10.0, but your Gemfile requires uri 0.12.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError) You have already activated strscan 3.0.1, but your Gemfile requires strscan 3.0.2. Since strscan is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports strscan as a default gem. (Gem::LoadError) I've run into this with uri, strscan, and other gem ..read more
Visit website
Black Friday 2022 Deals on GoRails, courses, and Jumpstart Pro!
GoRails
by
1y ago
It’s Black Friday again, and this is our once-a-year sale! It’s our way of saying thanks for all your support. You've been a huge part of making GoRails a success and Collin & I can't thank you enough. ? Here's what we've got going on this year: 36% off GoRails with the yearly plan - Get the deal Get a yearly subscription to GoRails for just $144/year. That's only $12/mo to stay up-to-date with Hotwire, Rails 7, Ruby 3, and much more! Gifting GoRails Want to send someone the gift of GoRails? Send us a message with the name and email of the recipient and how many months you'd like to gift t ..read more
Visit website
How To Test A Rails Rubygem Against Multiple Databases
GoRails
by
2y ago
If you're building a Rubygem that integrates with Rails and ActiveRecord, you'll probably want to test against multiple databases. This is pretty easy to setup for CI where you can run multiple databases in Docker containers with different steps, but what about local development? The DATABASE_URL is typically used for setting the production database for your Rails app. Hatchbox, Heroku, Render, etc all will set this environment variable for Rails to pick up and use the correct database. You might not realize that the DATABASE_URL can also be used for other things like testing! Instead of runni ..read more
Visit website
Black Friday 2021 Deals on GoRails, courses, and Jumpstart Pro!
GoRails
by
2y ago
I run sales once a year on Black Friday as a way of saying thank you. You've been a huge part of making GoRails a success and I can't thank you enough. ? Here's what we've got going on this year: 36% off GoRails with the yearly plan - Get the deal Get a yearly subscription to GoRails for just $144/year. That's only $12/mo to stay up-to-date with Hotwire, Rails 7, Ruby 3, and much more! If you're already subscribed to GoRails, you can upgrade from the monthly plan to lock in the savings. $50+ off Jumpstart Pro (Rails & iOS) - Get the deal Choose either the Rails or iOS template and get $50 ..read more
Visit website
How to render ActionText Attachments in Plain Text
GoRails
by
2y ago
ActionText supports custom attachments using Signed Global IDs. We can use this to embed any database record in Rails such as @mentions for users. For HTML, Rails will use the to_partial_path to render the HTML template for the attachment. For a user, this would be app/views/users/_user.html.erb. With Plain Text output, Rails will default to the caption specified on the attachable. Typically, this is nil because we don't need a caption for an @mention. By defining the attachable_plain_text_representation method, we can specify the default value for the plain text ActionText output. class User ..read more
Visit website
How to use Partials in Rails
GoRails
by
3y ago
If you want to keep your code simple and/or reuse a block of code in multiple files, then you can store that code in an html.erb file called a partial. Create partial ? Go to app > views. Create a folder called shared. Create a file to store your code in and name it using the syntax: _[partial].html.erb Insert partial ⬇️ In the file where you want to include the code from a partial, insert the tag <%= render partial "shared/[partial]%> View page ? You’ll see your page with the code from the partial included ..read more
Visit website

Follow GoRails on FeedSpot

Continue with Google
Continue with Apple
OR