Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Andreas Mayer's latest activity

Thursday, March 03 2011
5886 strip_tags marks as html_safe incorrectly was updated in Ruby on Rails
  • Andreas Mayer
    Andreas Mayer commented at 10:31 PM

    Typo above, should be:

    ... 1) can BYPASS the Rails ...

  • Andreas Mayer
    Andreas Mayer commented at 10:30 PM

    @Christopher: I think it's absolutely OK for strip_tags to return text that is not valid in any form (it only strips tags, and uses a very simple parse for this...

Saturday, January 29 2011
4249 [rails3 beta] "rails runner" can't be used in shebang lines was updated in Ruby on Rails
  • Andreas Mayer
    Andreas Mayer commented at 1:57 PM

    @Rohit: Thank you. As far as I see, this should work, but I haven't tested yet.

  • Andreas Mayer
    Andreas Mayer commented at 1:16 PM

    @Rohit: I did, and why shouldn't I? It is a documented feature and I didn't even have the idea that I couldn't run a Ruby script from crontab with a single comm...

Sunday, December 19 2010
6103 average() returns integer values instead of decimals was updated in Ruby on Rails
  • Andreas Mayer
    Andreas Mayer commented at 12:34 PM

    My :ratings are integer. Maybe this is the problem because the avg() of integer values still can be float - the avg() of 1 and 2 is not 1 but 1.5

Saturday, December 18 2010
6103 average() returns integer values instead of decimals was updated in Ruby on Rails
  • Andreas Mayer
    Andreas Mayer commented at 6:20 PM

    Maybe a MySQL driver-related issue? Or could this have been fixed in edge, shall I try?

Friday, December 03 2010
6103 average() returns integer values instead of decimals was updated in Ruby on Rails
  • Andreas Mayer
    • Tag changed from rails 3.0.3, activerecord, aggregations to rails 3.0.3, activerecord, aggregations, rails3
    by Andreas Mayer at 9:23 PM
  • Andreas Mayer
    • Tag changed from rails 3.0.3, aggregations, arel to rails 3.0.3, activerecord, aggregations
    by Andreas Mayer at 9:22 PM
Thursday, December 02 2010
4514 [PATCH] Check and immediately return value from an average if it's already a ... was updated in Ruby on Rails
6103 average() returns integer values instead of decimals was created in Ruby on Rails
  • Andreas Mayer
    Andreas Mayer created the ticket at 5:08 PM

    I have a table "comments" with column "rating".

    To get the average:

    > t.comments.calculate(:average, 'rating')
    => 4
    > t.comments.calculate(:average, 'rating')....