On Wed, Sep 12, 2007 at 06:04:11PM -0000, Matt Zukowski
wrote:> Is there a reason why render :update does not take the :status
> parameter as most other forms of render do?
>
> Unless I''m missing something, looking at ActionController::Base,
this
> should be as easy to fix as:
>
> line 770 in actionpack-1.13.3/lib/actioncontroller/base.rb:
>
> render_javascript(generator.to_s)
>
> becomes...
>
> render_javascript(generator.to_s, options[:status])
>
>
> This is too easy, so there must be a good reason why it was explicitly
> left out, right?
Don''t bet. We all make mistakes, and let''s be honest -- the
number of times
anyone''s going to want to render an RJS template when giving a non-OK
status
definitely sits in very close proximity to "never". So it
wouldn''t surprise
me if it got missed in the shuffle, and nobody''s noticed before because
it''s
a very uncommon thing to want to do.
On the other hand, it may have been left off on purpose because nobody could
imagine why someone would want to send JavaScript with a non-OK status code,
but if you''ve got a legitimate reason for wanting to do it, I cannot
see why
a patch wouldn''t be accepted to allow it.
- Matt
(Oooh, bricktext!)
--
I can only guess that the designer of the things had a major Toilet Duck
habit and had managed to score a couple of industrial-sized bottles of the
stuff the night before.
-- Tanuki
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---