#ruby on rails
15 posts tagged ruby on rails. Clear filter
-
Destroy Children In Rails 2.3
In the parent class place the following code This used to be accomplished with Check out the Rails docs for more information...
-
Make Rails Lib Module Methods Available to Views
If you create a module in the lib/ directory of your Rails application you won't have access to those methods in your views. If you don't want to put those methods in a helper file, you need to add...
-
Use a Cron Job to Automate Sphinx Index Refresh from Rails Rake Task
If using Sphinx, you need to refresh indexes when you add new content to your database. This is fairly easy to do by hand But if you want to automate this and use a cron, remember to set the PATH,...
-
Installing Feedzirra RSS Parser on Ubuntu 8
I recently watched a RailsCasts episode (http://railscasts.com/episodes/168-feed-parsing) on parsing and persisting RSS feeds using Feedzirra. It took a little setting up on Ubuntu because it...
-
Email Obfuscation and Extraction from Text with Rails
There is a helper method for handling the obfuscation of email addresses in Rails. If you want to then extract an email address(or all email addresses) from a block of text here is the code. I...
-
Postfix, ActionMailer and OpenSSL Fix on Ubuntu
If you run into problems using ActionMailer \ 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following: Change to OpenSSL support with Postfix does not work out...
-
Install Rmagick on Ubuntu with MagickWand
The last command will spit out a bunch of "No definition" comments. There are no rdocs available and this is why.
-
How to Use Pretty URLs with Rails will_paginate Plugin
The will\paginate plugin for Rails uses a key/value assignment like ?page=2, rather than the pretty url formats such as /page/2 ... This is because url generation and mapping are handled by the...
-
Using Your Partials in Your Liquid Templates
I'm working on a project that requires users/designers be allowed to edit the layout of their site. I'm using Liquid, Ruby templating system developed by the folks at shopify.com. Doing a little...
-
Rails: Expiring a cached page with namespaces and sweepers
I've got some pages that are cached using their permalinks on the filesystem, such as http://example.com/about-us.html which will need to map to RAILS\ROOT/public/about-us.html ... The issue I have...
-
Custom Date Formats for Your Rails Application
If you use a consistent date format often in your Rails applciation, it is worth it to add the format to your application environment. You can do this by adding it to the bottom of the...
-
Rails Migrations and Auto Incrementing Migration Prefix Number
In your environment.rb file turn off timestamped migrations like so:
-
How to Install Ferret, the Full Text Search Engine with Your Rails Application
Ferret is a full text search engine based on the popular Lucene Engine, which is originally written for Java. There is a great tutorial available here:...
-
Starting the Rails Console in Production Mode
To specify which mode you'd like the rails console to boot up in, just provide the string without any flags. If you're on windows, remember the backslash "\" rather than forward "/" and I believe...
-
Sample Rails Database Config for MySQL
Sample Ruby on Rails database config file for connecting to mysql.