I am excited to join forces with my friends in DC and work on some kick-ass Rails projects. Intridea has grown very fast in less than a year. Almost 15 Rails developers now.
I just ordered 30 inch Mac Cinema Display. I will be working from home, which will be fun and much more productive than going to an office. Finally no distractions and stupid meetings!!!
Friday, September 28, 2007
swf chart vs gruff
Need to evaluate them when I get some time. Requested Geoff to produce a screencast on Selenium on Rails. He responded back after a few days saying he has to learn it and has included it in this todo list.
Thursday, September 20, 2007
How to use Will Paginate 2.0 Rails plugin
Step 1: In the controller:
@users = User.paginate(:order => 'created_at DESC'
:conditions => ["active = ?", 1]
:per_page => 10,
:page => params[:page])
Step 2: In the view:
<%= will_paginate @users, :inner_window => 10, :outer_window => 10 %>
This will create page links from 1 to 10 then dots followed by numbered links for last 10 pages.
Step 3: To make the pagination links sexy, copy the following CSS (Digg style):
div.pagination {
padding: 3px;
margin: 3px;
}
div.pagination a {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #AAAADD;
text-decoration: none; /* no underline */
color: #000099;
}
div.pagination a:hover, div.pagination a:active {
border: 1px solid #000099;
color: #000;
}
div.pagination span.current {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #000099;
font-weight: bold;
background-color: #000099;
color: #FFF;
}
div.pagination span.disabled {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #EEE;
color: #DDD;
}
Reference: Err the blog.
@users = User.paginate(:order => 'created_at DESC'
:conditions => ["active = ?", 1]
:per_page => 10,
:page => params[:page])
Step 2: In the view:
<%= will_paginate @users, :inner_window => 10, :outer_window => 10 %>
This will create page links from 1 to 10 then dots followed by numbered links for last 10 pages.
Step 3: To make the pagination links sexy, copy the following CSS (Digg style):
div.pagination {
padding: 3px;
margin: 3px;
}
div.pagination a {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #AAAADD;
text-decoration: none; /* no underline */
color: #000099;
}
div.pagination a:hover, div.pagination a:active {
border: 1px solid #000099;
color: #000;
}
div.pagination span.current {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #000099;
font-weight: bold;
background-color: #000099;
color: #FFF;
}
div.pagination span.disabled {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #EEE;
color: #DDD;
}
Reference: Err the blog.
Tuesday, September 18, 2007
San Francisco Ruby Meetup
I presented my Ruby Idioms today at the San Francisco Ruby Meetup. It was my first presentation and I was very excited. It was full of examples and practical tips. Some of the idioms were described in the context of Rails applications. Soon I will be posting the link to the actual presentation in pdf format. Enjoy!
Subscribe to:
Posts (Atom)