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.
HTML Tags => Markdown Quick Reference (Cheat Sheet) for Static Site Gens & HTML Pros
Hello, FYI: I’ve put together a new HTML Tags <=> Markdown Cheat Sheet for static site generators such as Jekyll, Middleman, Nanoc, and friends. Why (yet another) Markdown cheat sheet? The new cheat sheet assumes you know HTML (inside-out) and shows how you markup hypertext in plain text without any angle brackets (</>) and - of course - the cheat sheet itself is in Markdown with “live” previews and “licensed” as public domain (that is, no copyright, no rights reserverd) for easy (re)use. Cheers.
Writing fast ruby – collect common ruby idioms
Let’s write faster code, together! [more inside]
Add a whole credit card form to your Volt app with 1 view tag
I love the idea of the Volt components and their ability to be declared as view tags. It seems to me that a credit card form would make a good component so here is a prototype component for the Braintree Drop-In form: https://github.com/cbetta/volt-braintree [more inside]
Get the latest version of a gem
I had enough if going to rubygems.org to find out what the latest version of Rails is. Add this to your bash or zsh profile to give yourself a simple command to quickly check the latest version: [more inside]
Planning ahead: taking a prototype to production
In this blog post I talk about writing a prototype in Rails with internal events mimicking microservices.
Be nice to others and your future-self: use Data Objects.
Data Objects explicitly define available attributes. This self-documentation is a great gift for other developers (and your future-self). In this blog post, I show the benefits of using Data Objects and how to use to Virtus to turn a complex data structure of nested hashes and arrays into Data Objects.
How to raise any object as a Ruby exception
It’s a common misconception that the raise method only accepts exceptions as its argument. This post will show you how you can raise ANYTHING, including numbers, dates, and your own custom classes. - http://blog.honeybadger.io/how-to-raise-any-object-as-a-ruby-exception/
Safely Storing Your Assets: Paperclip With AWS + Heroku
Integrating the paperclip gem is fun until you realize that you have to configure your application to work with AWS and Heroku. Then it might become a little less fun. This blog post walks through the steps of safely storing your assets using AWS S3, Heroku, and how to correctly configure environment variables.
About ROM and Sustainable Development Campaign
We launched a fundraising campaign for sustainable development of ROM. You can read the official announcement on our blog.
Setting up a Ruby-based HTTP-server to back your test suite
Look here about some information about setting up HTTP-servers with ruby: [more inside]
Faster Ruby Testing: Only Test What Matters
Automated testing is important. Fast, exhaustive automated testing is even more important. Tests are responsible for ensuring the code you spend hours creating actually works. A great test suite can be a safeguard against bugs, a directional guide towards extending the code, and an accurate measurement of the codebase’s health. The key to writing good tests is understanding where pieces of responsibility begin and end. Maintaining small concise automated tests can make all the difference.
A Recipe for Rails Continuous Integration
A basic CI process for a Rails app checks out the latest code and runs the test suite with rake. But there is so much more you can do with a good CI script. Here are my favorite techniques for using CI to run security analysis, automate Ruby and Bundler upgrades, test data migrations, and more. Get the most out of your CI!
How Rails’ fancy exception page works
One of the nice things about working with rails is that when something goes wrong in development, you get a really nice error detail page. Today we’re going to take a look at how these fancy error pages work. http://blog.honeybadger.io/how-rails-fancy-exception-page-works/
ActiveRecord isolated, namespaced scopes and methods using instance_exec and ActiveSu
A blog post about creating ActiveRecord concerns that include scopes hidden under chainable namespaces. With this approach you can have multiple scopes with the same name, providing different functionalities, based on a context. It can be also used to namespace everything that is under an ActiveRecord concern module. Read more.
Do You Know The Gem Gem?
Gem is a well known command amongst rubyists, for a good reason: it is central to the use of Ruby. Actually if you have only 3 days of Ruby in your life, you can use gem like a boss. Do you? I don’t. Not yet. http://xavier.nayrac.eu/2015/08/03/do-you-know-the-gem-gem/
The Cost of Using Ruby Gems
Gems are great but not when overused. Sometimes it’s better to think twice about resorting to using someone else’s code in your project. Jonasz Grochowski has some tips on that on the Ragnarson blog.
Web application Security Responsibility
Flicking of TV channels, clicks of mouse or the turning of newspapers pages would have inadvertently told you about the various hacking of mega corporations, with misappropriated data, personal and financial information. To read more, visit RailsCarma Blog
Permittribute
We sometimes face scenarios where we need same permitted attributes for a model in different controllers and end up re-writing all attributes again (violating DRY). Permittribute is meant to: - reuse same permitted attributes at different locations/controllers. - scope permitted attributes base on roles like admin, api etc. - group permitted attributes at a single reference point in their respective scopes. Read more…
Seeding a database using the Rails command line
When developing a Rails application, it’s important to seed the database with either manual or random data so the application looks realistic. There are some basic techniques to seed the database worth knowing that will save us time. http://davidmles.com/blog/seeding-database-rails/
Tackling God Objects in Ruby
Latest post in my series on Domain Driven Design. This is how I break down the model layer using Entity and Record Objects
Issue #2 of RubyIssue(s)
A curated list of ruby related issues collected from GitHub. Bi-monthly email delivery. This second issue points to issues from spreecommerce, compass, rspec, lotusrb, capistrano and bundler. It also honors people fixing issues mentioned in the last issue.
Audio Extension For Simple Captcha
Simple Audio Extension for Simple Captcha.. https://github.com/aditya-kapoor/simple-captcha-audio
Static Analysis in Ruby
This is a technique you can use when you need to extract information from the source code itself. http://www.blackbytes.info/2015/08/static-analysis-in-ruby/
Planet Jekyll's Showcase - The World's Greatest Static Sites - Polymer, Bootstrap,...
Hello, To highlight the latest (and greatest) static sites generated with the Jekyll machinery I’ve started Planet Jekyll’s Showcase. Open source static Jekyll sites include: Bootstrap • Polymer • Planet Ruby • football.db • Choose A License • Stack Exchange Blog and many more. Any site missing? Add your site! Cheers.
Wildlife vibrant Sublime text theme
I made a vibrant sublime text theme. Feel free to check it out here