Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: ccmcbeck
Depends on what your are trying to do in your controller tests, but here is what I did
If, like me, you also use Ryan's awesome nested_form gem, then you will be very interested in Issue #145 where the compatibilities with Turbolinks are getting resolved
Erich, that looks pretty nice. Perhaps your pattern is a good way to DRY up code between two PushState frameworks (Turbolinks on Desktop / jQuery Mobile on Mobile)
While I was thinking about it, I migrated to Turbolinks. Since I use bootstrap, I needed the https://github.com/kossnocorp/jquery.turbolinks gem to deal with the fact that bootstrap binds events to the body tag (this will be fixed in future releases to use the html tag).
Also, I use Turbolinks for my forms (like search) that use GET
$('form[method=get]:not([data-remote])').on 'submit', (event) ->
Turbolinks.visit @.action + '?' + $(@).serialize()
It was easy (1-2 days) for me to migrate my Rails 3.2 desktop app to use PJAX via the rack-pjax gem. I picked that gem because you specify the container. I chose to just PJAX the content between my header and footer tags.
However, I have a feeling that most of the performance win comes from not reprocessing the head tag so I would expect that just fragmenting the entire body is good enuff. When I get the time, I'll migrate from PJAX to Turbolinks.
Has anyone had any experience integrating either PJAX or Turbolinks with jQuery Mobile. JQM does has it's own pushState manager and converts all links into AJAX requests. It also does DOM caching of those pages so there are several issues to consider.
They now work out of the box with bootstrap and simple-form if you use the simple-form plugin which supports bootstrap wrappers
gem 'simple_form', '2.0.4'
gem 'client_side_validations', '3.2.1'
gem 'client_side_validations-simple_form', '2.0.1'
The gems must go in this order
Really a great technique. Rather than using a querystring param, I choose to use the URL extension. It just felt better than a querystring since Rails already responds to that to determine the correct MIME format:
session.has_key?(:mobile) ? session[:mobile] : request.user_agent =~ /Mobile|webOS/
if request.format == 'text/html'
session[:mobile] = false
session[:mobile] = true
request.format = :mobile if mobile_device?