1 2 3 4
def custom_pagination(num_item, per_page, current_page, max_pages=15) # ... if num_page <= max_pages ...
Ruby On ActiveRecord object custom ...
by Joe Grossberg,
September 08, 2008 14:53
First thing:
Don't use "ma...
Ruby On Too many assignments and co...
by Joe Grossberg,
August 29, 2008 20:34
What is going on, on line 2...
1 2 3 4
# fixed, per comment from N. Sanguinetti (below) -- thank you! :) Multiple return statements suck, though, and you should use his def test_web_browser() ...
Ruby On Code to detect the web browser
by Joe Grossberg,
August 28, 2008 19:05
A few additional points:
*...
1 2 3 4
# in User model def pretty_city ...
Ruby On Default value for user column
by Joe Grossberg,
August 19, 2008 20:40
No, it is not a good practi...
1 2 3 4
def email_list_to_array(list) people = [] list.split(',').each_with_index{|x,i| ...
Ruby On CSV turn in to an array of ...
by Joe Grossberg,
August 15, 2008 13:35
EDIT: Maciej's refactoring ...
Ruby On Find a URL in a database
by Joe Grossberg,
July 18, 2008 21:43
I wouldn't make the query d...
Ruby On Find a URL in a database
by Joe Grossberg,
July 18, 2008 21:42
I wouldn't make the query d...
Ruby On cleaner way to limit result...
by Joe Grossberg,
July 14, 2008 22:41
You might want to investiga...
1 2
div#bug_page { background: #000; font-family: courier; } div#bug_page span.error { color: #f00; }
Ruby On Adding render line in layou...
by Joe Grossberg,
July 10, 2008 13:21
Intial thoughts:
* How man...
Ruby On Why does this look weird in...
by Joe Grossberg,
July 04, 2008 14:54
"this page does not validat...
Ruby On Predicting future values ba...
by Joe Grossberg,
June 29, 2008 00:54
* Rather than specifically ...
Ruby On ActiveRecord: named_scope f...
by Joe Grossberg,
June 29, 2008 00:41
Change your model, so that ...
PHP On Interfacing Tor with cURL
by Joe Grossberg,
June 29, 2008 00:33
Not a refactoring, but a fe...

Not a refactoring, but thre...