kinopyo

Indoor enthusiast, web developer, and former hardcore RTS gamer. #building-bloggie
@kinopyo
kinopyo avatar

Recent Posts

  • What a lovely SmashingConf!

    I attended SmashingConf Toronto last week. It was such a lovely event.

    Published on
  • Upgrade Guide: ActiveStorage in Rails 6 and ImageProcessing

    The good and caveats when using ActiveStorage after upgrading to Rails 6

    Published on
  • Migrate from chromedriver-helper to Webdrivers

    chromedriver-helper is out of support as of 2019-03-31. Webdrivers is recommended as the replacement. It's also included in the Rails 6 Gemfile. Time for the switch! ️ Install Webdrivers gem bundle install and it's (almost) done! There is no...

    Published on
  • Stimulus: Stop event chain in the middle of multiple actions

    Stimulus supports multiple actions on a single element. For example, you can have a link like this: When the link is clicked, it'll go through session_controller.js first to check whether the user is logged in, and if so, continue to comment_co...

    Published on
  • Learning Design as a Developer: Just This One Tip to Get Started

    Whenever you find a design, a layout, an animation, a typography, a scenario that wow (or urgh) you, take a screenshot and write down just one sentence why you feel that way. Verbalize the intangible feeling, put them into plain words no matter ho...

    Published on
  • How to *Disable* Chrome 73 Dark Mode

    Chrome 73 comes with the support of Mac Dark Mode - if you've set your Mac OS run on the dark mode, Chrome will get that automatically. That also means you can't turn it off, not from Chrome's setting page. Here is the magic script to revert that...

    Published on
  • bootstrap.native: How to Use Toast Component

    In my previous post, I covered how to use bootstrap.native so you can drop the jQuery dependency right now. In this post, I'm gonna share how to use Toast component with bootstrap.native. Toast UI This popular UI component was added in Bootst...

    Published on
  • bootstrap.native - Bootstrap without jQuery

    Bootstrap 5 will remove jQuery as a dependency. That's good news ! But if you want to drop the dependency right now, you can accomplish it with bootstrap.native. bootstrap.native is a third-party plugin that perfectly mimics Bootstrap with vanil...

    Published on
  • Sending POST Requests With window.fetch In Rails

    TL;DR Be sure to include the CSRF token into the headers, otherwise, you'll run into InvalidAuthenticityToken exception. In old-fashioned Rails apps, CSRF token is handled by rails-ujs transparently so there is no extra work for you. However,...

    Published on
  • What's New In November at Bloggie

    Another month goes by. After reached the peak of my nerd life at Blizzcon 2018 and completed one of my bucket list, there are a lot of things to be reflected upon. But first thing first, I'm gonna share some of the updates from Bloggie . Title C...

    Published on
  • Rails: Enable Coffeescript with Webpacker

    We can already write JavaScript in ES6 syntax with Webpacker. But if you're in the transition phase to migrate an old Rails app from Sprockets (Asset Pipeline) to Webpacker, you might still want to keep your Coffeescript files in use. The default...

    Published on
  • What's New in October at Bloggie

    Hi, this is kinopyo from the Bloggie team . Today I want to reboot our monthly product update series and show you what happened for the last month. Normally this kind of reports would showcase the product behavior changes that bring value to the ...

    Published on
  • Parity: Managing Multiple Heroku Environments with Ease

    Parity is a set of shell commands from thoughtbot that help you easily manage Heroku staging and production apps, such as deployment, sync production DB to staging, etc. Wait.. Why do you need another tool? Parity provides powerful database bac...

    Published on
  • Github Tip: Closing Issue Automatically When the Pull Request Is Merged

    Suppose you send a Pull Request to fix a bug or implement a feature that is raised as an "issue" on Github. It would be tedious to rememb...

    Published on
  • Capybara: Trigger Blur Event

    I have a feature spec to test the Javascript behavior of the blur event, sadly Capybara's native DSL doesn't seem to support it yet. After quick research, I found two options. Simulate tab away from the element Click the page body My Pick Both ...

    Published on
  • You Might Still Need the Turbolinks Rails Gem Even with Webpacker

    After switching from Sprockets to Webpacker, I also dropped the gem Turbolinks from my Gemfile and integrated it with Webpacker. That had been running well until redirect_to stopped working. To be more accurate: It appeared redirect_to won't up...

    Published on
  • Rails: The Convenient Way to Load Custom Configuration Yaml File

    Rails.application.config_for is a convenient method to load custom yaml file from config/ folder for your current environment - development, test, and production. Getting Started For example, you have a payment config file like this: Rails.a...

    Published on
  • Error during rails credentials:edit "ActiveSupport::MessageEncryptor::InvalidMessage"

    I was trying to add a Slack webhook to the Rails app, when I ran bin/rails credentials:edit I got the error ActiveSupport::MessageEncryptor::InvalidMessage. Why that happened? It turned out it was because I lost the key 😅 (config/master.key) . T...

    Published on
  • Rails: Render Markdown Views and Partials

    Assume you have a markdown contents saved in a partial _about.md and you want to render it in your view. Custom Template Handler First, you would need to register the type/extension of .md and map it into a customized handler - let's call i...

    Published on
  • Return to the previous or a specific page after login with OmniAuth

    It's a common practice to return the user to the previous page or a specific page after he/she successfully logged in. If you're using OmniAuth, it's already well supported in the gem! The is request.env['omniauth.origin']. Scenario: return to ...

    Published on
  • 7 Practical Tips for ActiveStorage on Rails 5.2

    Get you started with Active Storage. Understand its data model, common usages, how to write the test, and possible gotchas.

    Published on