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.
Tocer 1.0.0
Tocer (a.k.a. Table of Contenter) is command line interface for generating table of contents for Markdown files. This is a great tool for adding to your build process to ensure documentation is never out-of-date. If you happen to be using Gemsmith for new gem creation, it has built-in support for Tocer. Enjoy!
Create Visual Magic with Bootstrap Gem
Bootstrap is a framework that makes it easy for a developer to create a nice design for an application or a website. The framework also comes with JavaScript, making it easier to create scroll spies, accordions, modals and popovers. The bootstrap gem also has a solid, thorough and easy to understand documentation providing example codes for most, if not all of the components that Bootstrap provides. Read more at RailsCarma Blog
Rails, Secure Cookies, HSTS and friends
In this article I review the motivation and the internals of some interesting security features in Ruby on Rails. Read more here.
Stripe on Rails 4.2.5 and RSpec 3.4
Stripe sample Rails 4.2.5 project with the features: [more inside]
Ruby gem "cards_lib" 0.2.0 released!
Arguably the “smartest” library available in Ruby for designing and creating your own card games. With features such as [more inside]
Ensure you understand ensure
Did you know that ensure gets executed every time you leave begin block regardless of exceptions? http://undefined-reference.org/2015/12/13/ensure-you-understand-ensure.html
Ruby: Arrays by Example
Showing various ways of getting things done with Arrays. http://6ftdan.com/allyourdev/2015/12/12/ruby-arrays-by-example/
Vanilla UJS
Basically it’s just about “to get the UJS features without jQuery”. These days we don’t really need jQuery in every webapp. Firstly, browsers becomes much more friendly about API (we have native querySelector and XHR2 now) and CSS (cool animation without any JS). Secondly, we don’t really want old-style apps, cause we have sockets (push notifications) and angular-like systems and other stuff. [more inside]
Transforming Hashes: A Refactoring Story
So many things are easy in Ruby. Transforming a complex hash is not one of them. I’ve yet to find a silver bullet for mapping complex hashes, but some approaches are better than others. Let’s take a look at how I got from bad to ugly to good enough.
Guide to 2016 Ruby Conferences / Camps @ Planet Ruby (Tip: Try $ rubyconf)
Hello, I’ve updated the Ruby Conference calendar for 2016. The Ruby Conference calendar is sourced by the awesome-events page @ Planet Ruby. Anything missing? Contributions welcome.
Tip: Use the $ rubyconf
command line tool (bundled with the whatson gem) to get latest news e.g.:
Dealing with Common Capybara Feature Test Failures
Learn how to minimize wait time for the pdf file loading on the web browser and other common issue with Capybara 2.5 using Rspec 3.3.2 and Rails 4.2.5 projects : Dealing with Common Capybara Feature Test Failures
Rails 5 Basics : Restricting Operations
Learn how to use http basic authentication in the twelfth chapter of Rails 5 Quickly book onlie : Restricting Operations
Code Ruby like you build Lego
Split your app based on business logic bricks and assemble them [more inside]
Query traces
Sometimes you just can’t tell where SQL and cache requests come from. But then, using more gems, you can: http://www.be9.io/2015/12/11/query-traces/
Monitoring services and adapters in Rails with Honeybadger, NewRelic and #prepend
The bigger your app gets the higher chance that it will need to integrate with multiple of external services, providers and APIs. Sometimes they work, sometimes they don’t. Sometimes it doesn’t matter when they are down or behaving problematically. Sometimes it costs your clients money. [more inside]
phoenixbricks
Rails bricks in a new name https://rubygems.org/gems/phoenixbricks . Please contribute if you can.
Strategic Benefits of SaaS for businesses
For an effective business ecosystem, an organization need to sustain competitiveness by reducing risks and assuring relatively safer returns for their investments. Check out some benefits on why SaaS makes sense for your business. Read More
Rails 5 Basics : Delete Comment
Learn how to delete a nested resource, read the eleventh chapter from Rails 5 Quickly book online Delete Comment
Using helper methods inside your controllers
Have you ever needed to use a helper method inside your controller? I did, a few times. If you included the helper module inside the controller, since Rails 3, as I did many times before, you did it wrong. [more inside]
Migrations, seeds and pipelines
Keep your migrations to a minimum by letting your schema dictate the state of your database, and have your seed files be responsible for the data within: https://www.madetech.com/blog/migrations-seeds-and-pipelines
New Gem Released "assign"
Now you can use any method inside a multiple assignment scenario. https://github.com/danielpclark/assign [more inside]
Why You Need A Ruby on Rails Expert
If you’re a non-technical founder who’s ready to launch a web app, there’s only one thing left to do: get yourself a Ruby on Rails expert.
Be aware of time operations when using cache with expires_in
In the last post I exposed some methods to calculate time difference in seconds, minutes and hours using Ruby on Rails. Today, we will explore how a small difference on time operations can become a nightmare when dealing with cache with expires_in parameter. [more inside]
25,000+ Req/s for Rack JSON API with MRuby
Use MRuby with H2O and Redis to build a Rack JSON API that serves 25,000+ requests per second.