Archive for June, 2006

This is straight from the “file_column website”:http://www.kanthak.net/opensource/file_column/:
Just make the “image” column ready for handling uploaded files…
class Entry < ActiveRecord::Base
file_column :image
end
… generate file fields *that keep uploaded images during form redisplays to your view…
<%= file_column_field “entry”, “image” %>
… and display uploaded images in your view:
<%= image_tag url_for_file_column(”entry”, “image”) %>
However, you may want to protect against the […]

Thursday, June 22nd, 2006 | No Comments

Issue direct query to database by:
result = ‘’ActiveRecord::Base.connection.execute(”SELECT * from tablename;”).each do |row| result += “#{row},” end

Sunday, June 18th, 2006 | No Comments

In my RAILS application I need to convert numbers to words. I started writing own function but before I finish that I got an amazing Plugin.
This Plugin is capable to convert number to words.
Following are some examples
>> 5.to_english
=> “five”
>> 123456.to_english
=> “one hundred twenty-three thousand four hundred and fifty-six”
>> 2.5.to_english
=> “two”
>> (2.5).to_english
=> “two”
>> (2.5).to_dollars
=> “two dollars […]

Friday, June 16th, 2006 | No Comments

I was searching for something about rails and find a very interesting thing. The Ajax Scaffold Generator.
The ajax scaffold generator is just too simple!.
One thing you must remember if using this ajax scaffold generator is that the browser back buttn might not work. I liked it very much and highly recomend this tool.
you can install […]

Friday, June 16th, 2006 | No Comments

If you want to speed up your Rails applicatoin, Please read this article…I think this can help you….
http://www.infoq.com/articles/Rails-Performance

Friday, June 16th, 2006 | No Comments