Thursday, September 25th, 2008
This is how to set default datetime in my current project. And you also can format like what i done.
1. Set default format in environment.rb
# Added default date/time display
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS[:default] = "%m/%d/%Y %I:%M%p"
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default] = "%m/%d/%Y"
2. Define in your code
>> Time.now
=> Thu Sep 25 01:24:30 +0800 2008
>> Date.today
=> Thu, 25 Sep 2008
>> ...
Posted in Ruby On Rails | 1 Comment »
Wednesday, September 17th, 2008
Thanks to twitter because of the update. I just follow rails group in twitter, they update the news and my TwitterFox alert me the news. Here 2 manual they just created. Check out link below to read the manual.
1. Rails Routing from the Outside In - updated September 13, 2008 ...
Posted in Ruby On Rails | No Comments »
Monday, July 7th, 2008
This is code that i just implement into my rails code. Actually this is how to read data in YAML file and implement it into rails code.
1. Create your yaml file in config/yourfilename.yml.
Example : let say we want read username and password from yaml file below.
2. How to load yaml ...
Posted in Ruby On Rails | No Comments »
Monday, June 16th, 2008
Congratulations for all Brazilian Railers! And a special thanks for Carlos Brando and to Marcos Tapajós who made the book.
This book contain what's new in rails 2.1. Click here to download pdf version or here to read online.....
Posted in Ruby On Rails | No Comments »
Saturday, June 7th, 2008
Sometimes people don't know how to start learn ruby programming and still searching which book are suitable to them as a beginner. So I'm also as a beginner in ruby and rails programming, will suggest people to get Mr. Neighborly's Humble Little Ruby Book as a reference to get start ...
Posted in Ruby On Rails | No Comments »
Wednesday, May 28th, 2008
Some new migration feature in rails 2.1,
Migration version number was keep trak in database, that means new rails was replace 'shema_info' with a new table called 'schema migrations'.The old 'schema_info' in Rails 2.0 just save the number of latest migration that has been execute but 'schema migrations' table was created ...
Posted in Ruby On Rails | 2 Comments »
Saturday, May 24th, 2008
1. Install Xcode 3.0 or newer
2. Make the following entries exist in /etc/profile
export RC_ARCHS=i386
export DYLD_LIBRARY_PATH=”/usr/local/oracle/instantclient”
export SQLPATH=”/usr/local/oracle/instantclient”
export PATH=”/usr/local/oracle/instantclient:$PATH”
3. Create folders
sudo mkdir -p /usr/local/src
sudo chgrp admin /usr/local/src
sudo chmod -R 775 /usr/local/src
cd /usr/local/src
4. Get Ruby (note: check what the current stable version is)
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
tar xzvf ruby-1.8.6-p111.tar.gz
cd ruby-1.8.6-p111
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ...
Posted in Ruby On Rails | No Comments »