The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Rails 5 trims session storage by discarding some flash messages
Rails 5 trims down session storage by removing discarded flash messages before persisting into the session. Read more
The Pure Function As An Object Pattern
In this article, I want to demonstrate a nice way to write functional-style code in Ruby. It is a way to write non-trivial pure functions, without a bunch of weird non-idiomatic code.
What kind of tests should I write for my project?
Should I test my project? Should I write dozens of tests for each feature? What kind of tests should I focus on? Not all projects are created equal - testing is the same. Sometimes you need to test hard, sometimes you don’t. I’m sharing a few observations on testing from my 16 yrs experience as a software developer. Test fundamentalists do not open ;-)
A Rails todo-list simple project
Login and account creation,Ajax(Drag & Drop to-do items),CSS,Nice templates/layouts. heroku https://pure-bayou-75590.herokuapp.com/ , github https://github.com/arnkorty/rails-todolist . test account email: test@test.com password: 123456
Scheduling Recurring Events with Ice Cube Gem
Ice_cube is a ruby library for effectively taking care of repeated events (schedules). The force lies in the ability to indicate multiple rules, and have ice_cube rapidly make sense of whether the schedule falls on a specific date (.occurs_on?), or what times it… read more
5 easy steps to use Refinery CMS and Spree e-commerce on the same Ruby on Rails app
In this guide we will learn how to: Generate the Ruby on Rails application, Install Spree 3.1.0, Install Refinery CMS 3.0.0, Mount Spree before Refinery, Enjoy your new Spree-Refinery app: 5 easy steps to use Refinery CMS and Spree e-commerce on the same Ruby on Rails application
Use Sunspot Stored Attributes to Search and Store Calculated Attributes on Rails
Read the following to see how to use Sunspot and solr to search calculated fields on your Rails models and give a drastic speed boost to your application. Read more
Avoid using exceptions for flow control
Why it’s a bad idea to use exception for flow control, and a short example based on devise’s code showing an alternative approach.
English Premier League (EPL) 2016/17 Season - Open Data in Text (n SQL, JSON,...)
Hello, I’ve added the new 2016/17 season for the English
Premier League (EPL). To import the plain text public domain datasets (fixtures) in your (SQL) database of choice (defaults to sqlite) use $ sportdb build in the /eng-england folder. It’s that easy ;-) Enjoy the beautiful game. Cheers. PS: Step 0.1 - $ gem install sportdb and Step 0.2 - $ git clone <https://github.com/openfootball/eng-england.git> or download the zip archive. PPS: Find out more about the sportdb gem family on the project site.
Sinatra Two Point Oh!
Today, I’m pleased to announce that Sinatra 2.0 has it’s first pre-release! Read the full post
[Screencast] Antivirus Uploads with Clamby
Using ClamAV, scan files uploaded to your application for viruses. In the event of a virus learn how to gracefully handle the infected file and notify the user. https://www.driftingruby.com/episodes/antivirus-uploads-with-clamby
Creating staging and other environments in Rails
Changes are you might need at some point staging, profiling, migration or other environments for your app. This post will tell you the 4 things to keep in mind when adding them.
How to Setup Solr Search on Rails with Sunspot
Solr’s an excellent search solution and a powerful tool to use for production rails app. It scales and can expand beyond searches on saved model attributes as well. Read more
meet zchannel.rb
zchannel provides a high level and easy to use API for sending objects between Ruby processes.
Basic design patterns in Ruby on Rails
I’ve chosen two design patterns I found the most common in Rails world and described them:
Rubinius takes the fun out of Ruby
A great read by Brian Shirai on how objects should be used for interactions and… functions should be used for data. Read more
The Ruby Community and Reputation
There’s been a lot of ranting recently. I’ve posted about in my “Elephant in the Room” post a few months ago, this is my conclusion and possibly last post about this subject.
How To Do A Case Or Switch Statement In SQL And Rails
This article describes the SQL case statement and how to use it in Rails.
New framework defaults in Rails 5 to make upgrade easier
To make the upgrade process easier, Rails 5 has added feature flags for all of the breaking changes, Read more about it in the blog post : Read more
field based authorization using cancancan
Blog post about a way to utilize cancancan to provide a field based authorization.
How to deploy Refinery CMS on Heroku
We have recently updated the guide to install and deploy a Refinery application on the Heroku hosting platform: Refinery CMS Heroku guide
Minitest Cheat Sheet
This cheat sheet is for novice programmers (or more experienced developers with poor memories) and includes a basic reference to core Minitest syntax as well as assertions and Minitest::Spec expectations with simple code examples. (Free PDF, no email signup required.)
HOWTO scrape websites with Ruby & Watir
Tutorial showing you how to scrape websites with Ruby and the Watir gem. Watir is powered by Selenium, which means that unlike Mechanize you can use it to interact with JavaScript!
Spy vs Double vs Instance Double in RSpec
Understand the important differences between them and when to use them.
Oprah: Opinionated presenters for Rails 5 - without the cruft
A new, lightweight but powerful presenter library for Rails 5. More information on the GitHub repository