The ability to add behavior to an object for a short time can make for some very flexible structures. Casting is a new gem that allows you to run methods from a module at runtime without altering the object's superclass structure (for example, no need for #extend).
jim — 32 posts
Ruby delegate.rb secrets saturnflyer.com
You may see quite a few uses for
SimpleDelegator but the delegate library has a lot more to it than just helping you manage method_missing. Read more about it at Ruby delegate.rb secretsSearch through bundled gems saturnflyer.com
Find something inside your bundled gems with
You can use ack or grep if you like. I wrote a bit about searching through your bundled gems on my blog.
ag whatyouwant `bundle show --paths`
You can use ack or grep if you like. I wrote a bit about searching through your bundled gems on my blog.
Read about how ActiveSupport::Concern won't reveal how your system works or why any of those concerns exist where they do. DCI is an approach to help you capture how objects collaborate and not just separate methods into modules.
The Gang of Four is Wrong and You Don't Understand Delegation saturnflyer.com
Getting programming concepts wrong leads to problems understanding them, of course. The Gang of Four cited the original work on delegation and explained it incorrectly because their language couldn't do it. Get delegation right. Ruby doesn't.
How Does Rack Parse Query Params? codefol.io
Noah Gibbs recently wrote about understanding parameter parsing in How Does Rack Parse Query Params? With parse_nested_query.
Why Is My Web Service API Crappy? twitch.nervestaple.com
Christopher Miles has a great article: Why Is My Web Service API Crappy? and it's definitely worth a read if you're building externally facing APIs.
Wroclove.rb Links wrocloverb.com
There were some great presentations at wroclove.rb and Michał Kwiatkowski is gathering a list of all the things you missed.
Triggering the DCI Context saturnflyer.com
In continuing the discussion of DCI, I've written a bit about what purpose the Context serves. It's not just a new junk drawer to use
extend with objects and modules.Arlington Ruby's first Unconference February 4 conf.arlingtonruby.org
Arlington Ruby is a group that's less than a year old but we're growing strong and putting together our first unconference. This is a FREE event, just contact us for a coupon code: http://conf.arlingtonruby.org/
Radiant CMS 1.0 RC4 is out radiantcms.org
Radiant is alive again with release candidate 4 for version 1.0. And you can now run tests for your extensions on travis ci.
Read more about why you might care about DCI (Data, Context, and Interaction — a new approach to object oriented code) in my latest post on the subject. OOP, DCI And Ruby - What Your System Is Vs. What Your System Does discusses separation of objects from the actions they perform.
4 Simple Steps to more obvious code saturnflyer.com
I've been exploring DCI in relationship to Rails and wrote about some very simple steps to move toward a more object oriented way of thinking. This isn't a full example of DCI, but it's a start.
gem install radiant --pre and try out the RC2.
Thank you everyone who helped report and fix bugs.
Release Candidate for Radiant 1.0 radiantcms.org
We've just released the first release candidate for Radiant 1.0; the last Rails 2 version.
gem install radiant --preAlways check in schema.rb saturnflyer.com
Some argue that schema.rb should be ignored in your version control. Long story short, I argue that it should not.
Manage CSS and Javascript from Radiant CMS radiantcms.org
I recently added a new feature to Radiant to allow users to manage their own CSS and Javascript content. Read about the change and the Radiant blog and leave your complaints or praise in the comments.
Metaprogramming in Radiant to solve a simple problem saturnflyer.com
I wrote about some simple metaprogramming in Radiant to solve an annoying problem of not being able to use custom tags in different contexts. Radiant includes custom tags in the Page model, and a popular option for managing stylesheets and javascripts prevents you from using these same custom tags in them. A few simple lines changes that.
Radiant CMS 0.9 is out radiantcms.org
I'm happy to say that Radiant CMS 0.9 has been released. It's got internationalization, pagination tags, loads extensions as gems, and lots of other fixes and features.
Rack Cache on Heroku with Memcache saturnflyer.com
I wrote down some details about using the memcached heroku add-on with rack-cache. It wasn't obvious to me at first.
In depth look at Radiant's Page#find_by_url saturnflyer.com
I've written up some details about how Radiant manages finding content and how you can override that behavior for your own needs. There's a quick summary at the top of the post if you're in a hurry.
Combining show_for and stonewall github.com
I put together a simple plugin called show_for_stonewall and just put a quick blog post about using it.
It simply alters show_for to allow for the guarding of data that stonewall provides.
It simply alters show_for to allow for the guarding of data that stonewall provides.
John Muhl is added to the Radiant CMS core team radiantcms.org
There's a quick post about it on the Radiant blog.
Radiant CMS 0.9.0 RC2 released radiantcms.org
We've released RC2 of Radiant 0.9.0 and have some details about it on the Radiant blog. The big news is support for internationalization in the admin interface, support for extensions as gems, and other features.
Remotely enable/disable Radiant sites saturnflyer.com
I've created the enabler extension to allow you to enable and disable a Radiant site remotely.
Just install it and when your customer's account is in default, post to
Let me know what you think.
Just install it and when your customer's account is in default, post to
the_site.com/admin/disable/your_secret_key. Once your customer has paid her bills, just post to the_site.com/admin/enable/your_secret_key
Let me know what you think.
using git bisect phunkwork.com
I just found a short article on using git bisect.
Thoughts on Radiant, plugins, and integration saturnflyer.com
I've posted 2 articles about Radiant CMS integration with Rails projects and loading plugins.
Feedback welcome! Radiant seems to be both popular and unpopular for different reasons and I'm hoping that each release makes it easier to use with the code you write.
Feedback welcome! Radiant seems to be both popular and unpopular for different reasons and I'm hoping that each release makes it easier to use with the code you write.
Commenting in Radiant CMS from a gem saturnflyer.com
I have a quick post about the radiant comments extension as a gem. Read a bit about it and some more details in the comments.
Radiant Config In Source Control saturnflyer.com
Quick mention of a simple feature to store config data in your source for Radiant CMS.
Firing up the team at Radiant CMS radiantcms.org
In new developments with Radiant CMS, Sean Cribbs is stepping down as the team lead (although still an active member of the core) and, Jim Gay is taking the reins and William Ross has been added to the Core Team.
Loading Radiant CMS extensions from a non-standard location saturnflyer.com
I often have websites that need to have similar functionality. Here I discuss a simple way to manage standard and custom extensions between different sites.
Cache Key For Collections In ActiveRecord saturnflyer.com
I've been working to add caching to an application and looked around for a solution to use a cache_key for lists of objects and found nothing out there. I've written up some details about adding a cache_key method for activerecord collections and I've thrown it into a simple group_cache_key gem
