Learn

GROW YOUR SKILLSET. EVOLVE YOUR CAREER.

How to install Bootstrap 4 in Rails

How to install Bootstrap 4 in Rails

Every day there’s a new library in the spotlight or maybe just a new version of a really popular one like Bootstrap in this case that doesn’t always have a corresponding ruby gem that you can install into your app yet. So what do you do? Do you sit and wait until someone decides to write one for you?

Understanding and extending Rails form helpers

Understanding and extending Rails form helpers

Helpers in rails are meant to clean up view code by allowing you to extract data processing logic from your markup code. By moving the logic out, you get an added benefit, you can test your “view logic” easier. At least that’s the most common use case you’ll see in Rails.

Nested trees with Ruby on Rails

Nested trees with Ruby on Rails

Did you ever needed to get the children’s children of a newsted tree like structure? Well it turns out, in Rails, that stuff is pretty easy to do. You can use the awesome_nested_set gem and you’re all set, everything is right there for you to use.

Decoupling CSS Selectors From Your Tests

Decoupling CSS Selectors From Your Tests

For a long time, I’ve been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capybara). In this short article, I’m going to try Eduardo Gutierrez’s suggestion of using data attributes for targeting DOM elements instead of CSS selectors.

7 Steps to better Cucumber tests

7 Steps to better Cucumber tests

When you are starting out with rails testing there are so many things you need to learn about and thus it’s very hard to have a clear picture of what goes where and what’s the best way of writing unit tests and view specs and integration tests etc.