Re: [Rails-core] Using tilt in ActionView?

2011-09-11 Thread Jonas Nicklas
I seem to remember that Tilt didn't support encodings, but maybe this has been fixed? /Jonas On Mon, Sep 12, 2011 at 4:13 AM, Nick Sutterer wrote: > Hey friends, > > I was wondering what is the current opinion on using tilt in > ActionView? Right now, there's a lot of code in AV::Template/ > Tem

Re: [Rails-core] Missing Content-Length header breaks ActiveResource 3.1 on create

2011-09-09 Thread Jonas Nicklas
Sounds like this is probably due to Rails returning a 304 not modified, which doesn't have a Content-Length header. ActiveResource should be able to handle that, or it shouldn't send an if-modified-since header if it can't deal with the 304. /Jonas On Fri, Sep 9, 2011 at 9:22 AM, Sidu Ponnappa w

Re: [Rails-core] Javascript is now a first-class code citizen - Really?!

2011-09-01 Thread Jonas Nicklas
Definitely +1 for Jasmine It's easily the best test framework for JavaScript. I wrote a wrapper around it called Evergreen, which has gained a little traction. You should check it out for inspiration I think, since it does a lot of things very differently than most other similar libraries. I think

Re: [Rails-core] RDoc 2.2.0 requirement

2010-06-21 Thread Jonas Nicklas
Have you considered SDoc? Imho it's the nicest overall documentation template so far. The search works incredibly well. You can see it in action here: http://railsapi.com/doc/rails-v2.3.8/ /Jonas On Thu, Jun 17, 2010 at 4:47 PM, Xavier Noria wrote: > On Thu, Jun 17, 2010 at 4:29 PM, Hongli Lai

Re: [Rails-core] Overview of Ruby 1.9 encoding problem tickets

2010-04-19 Thread Jonas Nicklas
It's great to see someone finally take charge of this! I still don't have the greatest grasp of character encodings, but what you're suggesting sounds good. Maybe one additional thing: make all generators put the magic comment with the standard encoding at the top of all source files they create.

Re: [Rails-core] Harmonizing JSON/XML serialization

2010-04-19 Thread Jonas Nicklas
JSON is not XML. What you are proposing is to use JSON as though it were XML, which doesn't make any sense in my oppinion. Let them each play to their strengths. /Jonas On Mon, Apr 5, 2010 at 9:16 PM, James MacAulay wrote: > The way Rails handles root nodes in JSON and XML serialization is > inc

Re: [Rails-core] Re: Introducing Object#self

2010-04-16 Thread Jonas Nicklas
ramework", here it is: > > http://github.com/rails/rails/commit/51730792ca9 > > > On Apr 16, 5:30 pm, Mislav Marohnić wrote: >> On Fri, Apr 16, 2010 at 13:44, Jonas Nicklas wrote: >> >> >> >> > @users = @users.select(&:admin?) if @admins

Re: [Rails-core] Re: Introducing Object#self

2010-04-16 Thread Jonas Nicklas
Why not rewrite that as: if @admins_only @users.select(&:admin?).sort else @users.sort end or even @users = @users.select(&:admin?) if @admins_only @users.sort I think that is infinitely easier to read and understand (it took me a while to figure out what the hell your code was doing). Just

Re: [Rails-core] XSS in Rails 3: "raw(...)" for EVERY SINGLE FIXED(!) STRING??!!

2010-04-04 Thread Jonas Nicklas
Unfortunately, there's no way to know if a string is a literal or not, short of parsing the Ruby, and considering the sheer number of string literals in Ruby, that seems very infeasible. /Jonas P.S.: off the top of my head: "word" 'word' %(word) %[word] %{word} %q(word) %q[word] %q{word} %Q(word

Re: [Rails-core] Rails 3.0 beta not tagged on GitHub

2010-02-07 Thread Jonas Nicklas
Agreed, I can't see any reason why it *shouldn't* be tagged. It's not like tags are a limited resource. /Jonas On Sun, Feb 7, 2010 at 4:02 PM, Mislav Marohnić wrote: > On Sat, Feb 6, 2010 at 23:29, Mikel Lindsaar wrote: >> >> Generally release candidates are tagged, but the beta won't be.  The

[Rails-core] Re: On-By-Default XSS escaping

2009-07-27 Thread Jonas Nicklas
Looks good. Will be nice not to have to worry about XSS so much anymore. Out of curiosity, what is the reasoning behind not using the 'taint' mechanism built into Ruby. Is it because this is more of a white-list approach, whereas 'taint' is more of a black-list approach? /Jonas On Tue, Jul 28, 2

[Rails-core] Re: trouble booting Webrick after unpgrading Rails

2009-06-14 Thread Jonas Nicklas
It looks from the stack trace like ActiveScaffold is trying to alias_method_chain a method that no longer exists, you are probably using an old version of ActiveScaffold, try upgrading. /Jonas P.S.: The Ruby on Rails Talk list at http://groups.google.com/group/rubyonrails-talk is the more appropr

[Rails-core] Re: Routing params helper with :as

2009-05-18 Thread Jonas Nicklas
I think the current behaviour is correct. It seems to me that :as changes the url and *only* the url. If it starts to have implications on the controller, that would be very confusing. Say you would use :as to provid l10n names for routes, this is something we do very often. So we have a route like

[Rails-core] Re: Built associations don't know their parent. Why not?

2009-04-24 Thread Jonas Nicklas
Wouldn't all of these problems be solved by an identity map? Wouldn't that be a better solution than trying to hack this on the existing system? /Jonas On Thu, Apr 23, 2009 at 1:26 AM, Michael Koziarski wrote: > > > FWIW, that's basically how Sequel handles it, with the :reciprocal > > option,