On Jan 1, 7:59 am, Jim <[email protected]> wrote:
> I first noticed this on an iPhone running iPhone OS 3.1.2:
> ActiveScaffold is issuing an SQL request (according to the log file)
> of
>
> SELECT "foo".* FROM "foo" ORDER BY foo."id" ASC LIMIT 999999999 OFFSET
> 0

I've been going through the code and watching my log messages.  It's
clear that in the list.rb/do_list check on what the params hash
includes a non-iPhone agent does not supply a :format key, so the code
asks if it supports :html and/or :js, but the iPhone is supplying
a :format key, which is iphone.  This is what causes the limit to
default to 999999999.  I added 'iphone' to the array that calls the
include? method to fix the limit issue (which it does), but the code
still eventually returns the 406 Not Acceptable.

By adding :iphone to the array defined in core.rb/default_formats I
now get a missing template error -- And so I worked through the
missing template errors duplicating all the *.html.erb files with
*.iphone.erb files and I have a web page displaying on the iPhone
(sans stylesheet, but I'll get that squared away).

So... is there a better way to handle this? :-)

--

You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.


Reply via email to