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.
Security Fix and Concerns
ror_ecommerce had its first security announcement. Once this announcement became public, I have become very concerned about how to make these announcements and think the community needs to find a better way.
Get rid of digest errors in Angular applications with memoization
Check out my post/a> about how to fix Error: 10 $digest() iterations reached. Aborting! in your Angular applications.
tty-progressbar v0.3.0 released
The newest tty-progressbar offers automatic resizing, optimisation of formatting tokens, easier configuration and ability to clear progress once finished. Please give it a whirl!
jekyll-planet gem - Add Articles, Blogs to Your Site via Web Feeds (and Planet Pluto)
Hello, the jekyll-planet gem lets you generate Jekyll posts for your static site using the Planet Pluto machinery. Add articles or blog posts syndicated via web feed to your site in three steps: Step 1: Use a Planet Pluto configuration e.g. planet.ini to build your local planet.db SQLite feed cache. Step 2: Generate planet posts for Jekyll (from the planet.db cache) using the jekyll-planet Ruby script. Step 3: Use Jekyll as usual to build your site. That’s it. Happy Planet. Cheers.
Add Twitter cards to your Rails site with metamagic
Here’s all you need to add Twitter cards to your Rails site, using the metamagic gem.
Any gem as standalone binary that works with any ruby -- rubinjam
Rubinjam any gem (w/o native ext) into a binary curl https://rubinjam.herokuapp.com/pack/rake > rake && chmod +x rake && ./rake –version
Lifetime Ruby on Rails Mentorship giveaway
Hey! Just wanted to share this exciting Christmas giveaway of Lifetime access to Rails mentorship. 4 days left to join so hurry up :D
Hash19: A Ruby gem to map complex JSON to objects
I just wrote a JSON aggregation library that I thought would be a fairly common use-case. A write up on that is available here
Testing logging in Ruby with StringIO and a few lines of code
Testing logging in Ruby with StringIO
Opal under a microscope: Object creation in Ruby and JavaScript
In this post we’ll learn how Ruby objects are mapped in JavaScript-land by the Opal compiler, how to call methods on them and how object instantiation works for both Ruby and JavaScript.
Video Tutorial: Deploy Ruby on Rails To Your Own Server
Learn how to Deploy Ruby on Rails To Your Own Server with this video tutorial series using Ubuntu, Postgres, Nginx, and Unicorn.
Repository Driven Infrastructure
Repository Driven Infrastructure helps managing your infrastructure from your repository. Developers describe their intent to deploy, the system picks it up and follows through on it. [more inside]
Rails Fundamentals: Introducing Strong Parameters
One of Rails’ most visible historical protections against malicious data corruption involved using the attr_accessible method within a model to identify which model attributes could be passed into methods like new and update_attributes for mass assignment. This changed with Rails 4, thanks to a new approach for managing mass assignment behavior. Known as strong parameters, the task of defining which parameters are available for mass assignment has been moved out of the model and into the controllers, allowing developers to define mass assignment behavior according to action. In this tutorial, I’ll introduce you to strong parameters, and include several usage examples.
search_cop v1.0.3 released
I just released v1.0.3 of search_cop which brings support for Rails 4.2. Happy searching.
Elegant permalinks in Rails
Small guide about adding elegant permalinks to your Rails app using the friendly_id gem.
You lose context when using an API
Just blogged about the difference between server side HTML rendering and the use of an API. [more inside]
Hashie Considered Harmful - An Ode to Hash and OpenStruct
Have you ever used Hashie? You may (not) be surprised that it’s a horrible idea. But you may interested to learn hashie is responsible for a 5% decrease in all app speed if you’re using omniauth. To learn more about why having an object that inherits from hash and acts like an object, read hashie considered harmful
A Ruby Refactor: Exploring Dependency Injection Options
I wrote a new post titled A Ruby Refactor: Exploring Dependency Injection Options. Hope you enjoy!
First impression about ROM (Ruby Object Mapper)
Here I listed my experience with DataMapper 2 which wasn’t released and ROM (inheritor of DataMapper 2). We already started using it and I guess our experience may be interesting for other developers as well.
Keep method_missing and respond_to_missing? in sync with hook_lying_syncer!
One of the big gotchas of Ruby metaprogramming is the need to keep method_missing and respond_to_missing? in sync. I’ve just published the hook_lying_syncer gem (code on Github) to help with this. See the README on Github for details.
Where Does Your Code Go?
After you finish the Rails tutorials and start your own app, things get confusing. Like where does your non-CRUD, general logic go? How does grabbing followers from Twitter fit into MVC? Ask two people, and you get four answers. So where do you put your code, and still keep things simple?
Preferring Value Objects Or Setters And Arguments
I recently wrote a post where I show some code displaying the contrast between using value objects and setter methods.
Baruco meets FutureJS: Announcing Full Stack Fest 2015!
After the continued success of three editions of Baruco and one of FutureJS, we are already working on a new twist for 2015, and we are proud to announce it today: Full Stack Fest.
Opinionated guide to service objects
I just decided to write a blog post about Service Objects, which is a pretty controversial topic these days. Hope there will be a lot of comments and stormy discussion :)
Planet Pluto Update v1.1.0 / Modul-mania - pluto-models, pluto-update, pluto-tasks, etc.
I’ve uploaded a new pluto version, that is, v1.1.0. What’s pluto? A free planet site generator for building web pages from published web feeds e.g. Planet Ruby, Planet JavaScript, etc.
What’s news? The pluto gem is now split up into five gems. The lineup includes: pluto, pluto-models, pluto-update, pluto-merge, pluto-tasks The idea is to make it easier to use what you need and make it easier to change to your needs. All planet temlates (e.g. hacker, news, digest, etc.) moved to its own GitHub org, that is, planet-templates and you can now install planet templates w/ npm too e.g. $ npm install planet-top. Happy planet. Cheers.