Replaceable render engines for Formtastic
One of the things I love about Formtastic is the semantic DSL for specifying a form in my code. One of the things that can frustrate me is the resulting DOM that is generated.
rails
One of the things I love about Formtastic is the semantic DSL for specifying a form in my code. One of the things that can frustrate me is the resulting DOM that is generated.
I ran into a few snags upgrading ReviewRamp from Rails 2.3.2 to 2.3.5
jqGrid is a high quality grid plug-in for jQuery. I made a couple of tweaks so it supports RESTful requests and Rails routes.
My specs started failing, I traced the problem to the acts_as_paranoid plugin
SaasRamp is an open source Rails plugin which enables subscription billings in your application. This screencast demos SaasRamp and explores the generators and features built into the plugin.
Using some generators and a behavior driven approach, we create a simple Rails application with one resource and user authentication.
The BaseWithoutTable Rails plugin is handy for making models that don't have a corresponding database table. I started using it about a year ago and thought I do a little writeup about it.
A helper that's been missing from Rails
Last night I presented at the monthly NH Ruby users group meeting.
Using Cucumber, the executable plain-text documentation tool, you may want to see the current page in a scenario. I use a generic "And (show me)" step.
A technique for handling routes to resources that the current user owns.
How I'm using cookies to communicate non-critical user activity back to the server. My application and this example uses Ruby on Rails with jQuery for client-side javascript, and the jQuery cookie plugin. and JSON .
I found myself frequently doing something like "table_#{id}", so i added a little string method that lets me say 'table'._(id)
I had a problem with will_paginate when giving it a page number and per_page settings that are out of range, resulting in an empty table on the page. And here's how I solved it.
Lets you make has_many associations look like a has_one (Note, i've renamed it, was has_one_current (Nov 14))
The Rails "partial layouts" feature doesn't work how I expected with collections. Here's a helper.
A testament to testing and behavior driven development. Implementing file uploads.
Create separate textmate projects that contain only the subdirs I want to search in.
There's a number of postings that explain how to use alias_method_chain, but it wasn't clear how to use it in a module.
This is the Rails way...
Unfortunately better_nested_set (and acts_as_nested_set) lacks the list methods provided by acts_as_list. Here's a module that provides them.
Here's a variant of Rails' options_for_select helper which lets you add styles to the options, such as for adding icons the the dropdown select.
A simple helper variant of link_to_unless_current which tags the current item.
Here's a patch to the in_place_editor to work smoother with RESTful resources.
I want users to be able to design their own forms, and collect data submitted on those forms. An important decision is the design of how these custom dynamic records are stored and accessed.
Here's a short how-to, cobbled together from various other articles, emails, and generous help on #rspec. Consider this a stop-gap until documentation is up on the Rspec site.
I'd read that I could expect significant speed improvements using Sqlite in-memory database during testing. But that's not what I found.
You can override the url_for options to set subdomains in named routes.