Nick Brewer pointed me at Active Admin recently, and I think I'm going to try to use it in a project very soon. Active Admin generates a modern administration interface for your Ruby on Rails application. It seems to go well beyond the typical CRUD...
Typically you use the error_messages_for method in Rails to show the model validations that have failed at the top of a reloaded form so the user can take action and resubmit. It's a really slick way to handle server-side validations and client side...
Usually I use .htaccess to lock down a dev site or something I don't want the world to see. This morning I had to do it for a Rails app and didn't have the luxury of using .htaccess so this is what I did as a quick and dirty solution.
class...
Here's a helper method I wrote in order to resize an image for display. And yes, you should always try to physically resize an image and not just change the height and width in the image tag so that you save space and bandwidth and load time. However, I...
I typically have the following code in my application_controller.rb file in Rails apps:
# any time we get a RecordNotFound Exception we're going to rescue from it and throw a 404
rescue_from ActiveRecord::RecordNotFound, :with => :throw_404
#...
I had to modify an application to ensure the https protocol was used on some important pages such as new user registration, login, shopping cart checkout, etc. Here's a really easy method you can place into your application_controller.rb and call as a...
We were recently working on a rake task to generate an XML Sitemap of a site's content for submission to the search engines. Because we are trying to remain as RESTful as possible, I wanted to take advantage of the helpers given to me automatically. For...
I wanted to implement a simple captcha for for article comments on a site. And by simple, I mean both in aesthetics and in functionality. After looking around, I found this post that described how you could implement a plugin called Simple Captcha in 10...
We use Java as the foundation for our product framework at work. While we've always been pleased with Java compared to the P's in LAMP (PHP and Perl), I've often wondered, "Is there an easier way? Do we really need all these pieces and parts that make up...
I've been using a free GTD system called Tracks for about a month now. From their web site:
Tracks is a web-based application to help you implement David Allen’s Getting Things Done™ methodology. It was built using Ruby on Rails, and comes with...
My movie site is coming along well so far. We've made lots of progess on all the core functionality you would expect to see:
Movie information
Reading movie reviews
Creating movie reviews
Seeing new members and their activity
Rating...
I'm forcing myself to write tests for all my development on the movie site. (We still haven't chosen a final name for it - lame...) Once of the things I love the most in Rails is Fixtures.
Fixtures allow you to setup your test data in YAML or...
Recent Comments