Tiago Scolari

bits for fun

Android Webapp in 3 Minutes

2011-09-19
I’m going to use the rails application I created on the post How to Build a Mobile Rails 3.1 App to create a simple android app. You probably can do this in less than 3 minutes, I guess. ** UPDATE ** This guide is good to get you started, but I consider it deprecated. I think the end result gives a bad user experience, since it will won’t behave as an proper mobile app, and it won’t also behave as a webpage. Continue reading

Vagrant Archlinux Box

2011-09-18
I could not find a vagrant archlinux box, so I created one. It’s available on SourceForge. (Archlinux 2011.08.19) It’s very easy to setup: gem install vagrant vagrant box add archlinux http://ftp.heanet.ie/mirrors/sourceforge/v/project/va/vagrantarchlinx/2011.08.19/archlinux_2011.08.19.box vagrant init vagrant up You can download it manually too.

JQuery-Mobile for Rails 3.1 Gem

2011-09-14
I’ve created a very simple gem that includes the jquery mobile files to Rails’ assets pipeline. To install, just add to your Gemfile: gem 'jquery_mobile_rails' And require the javascript/css files in your manifests: //= require jquery.mobile.min *= require jquery.mobile.min That’s it. No helpers, no methods, only the files in your application assets pipeline. For more information check the github repo.

Mobylette: Mobile Requests Handling (GEM)

2011-09-03
In the last few days have been working on this gem. It’s named Mobylette and it works by identifying mobile requests in your app, and handling them with a new .mobile format. Mobylette’s Github project Mobylette’s Documentation Mobylette on RubyGems.org Once you have it installed on your application, adding respond_to_mobile_requests to your controller will enable it to deal with mobile requests. It will automatically look for a .mobile.erb (.haml, or whatever) when a request comes from a mobile device. Continue reading

Asynchronous UISearchBar / UISearchDisplayController With Autocomplete

2011-08-19
This is my second week working with objective-c and iphone. The task is to make a search with autocomplete. Both search and autocomplete should get results from a remote webservice. I was searching google about how to populate a UISearchDisplayController with remote data, asynchronously of course, when I found a great guide here. I already had a working datasource for autocomplete: - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [_autocompleteDataSource searchFor:searchString]; return NO; } The trick was to reload the tableview data in my datasource ([tableView reloadData]), when it finishes loading. Continue reading

Uploadify on Rails, without rack middleware (using devise)

2011-03-31
You can avoid the middleware hack when using flash in rails with logged in users. As you should know, the browser doesn’t share the session with flash. Before using devise, I was using a rack middleware to hack into user session. But there is a much cleaner way if you use devise, you can use the built in feature :authentication_token. More details on how are here.
Newer posts