Shouldn't this solve the problem ?
unless defined?(ActiveSupport::StringInquirer)
require 'active_support/string_inquirer'
end
On Mon, Oct 13, 2008 at 2:19 AM, Mislav Marohnić
<[EMAIL PROTECTED]> wrote:
> I've been profiling performance of our app and noticed that all the call
On Mon, Oct 13, 2008 at 2:42 AM, Ryan Bigg <[EMAIL PROTECTED]> wrote:
> Honestly, what's so hard about calling RAILS_ENV == "production"
> wherever it needs to be called?
You can still do that of course, that's fine (though it does not look
to me as modern Rails anymore).
But the fact is Rails
On Mon, Oct 13, 2008 at 2:44 AM, Mislav Marohnić
<[EMAIL PROTECTED]> wrote:
> On Mon, Oct 13, 2008 at 02:35, Tarmo Tänav <[EMAIL PROTECTED]> wrote:
>>
>> Any ideas on how to make that work?
>
> The method could overwrite itself on first call.
> module Test
> def self.env
> e = 'production'
>
On Mon, Oct 13, 2008 at 02:35, Tarmo Tänav <[EMAIL PROTECTED]> wrote:
>
> Any ideas on how to make that work?
The method could overwrite itself on first call.
module Test
def self.env
e = 'production'
def self.env() 'development' end
e
end
end
Test.env # => 'production'
Test.en
Honestly, what's so hard about calling RAILS_ENV == "production"
wherever it needs to be called?
-
Ryan Bigg
Freelancer
http://frozenplague.net
On 13/10/2008, at 11:05 AM, Tarmo Tänav wrote:
>
> On E, 2008-10-13 at 02:19 +0200, Mislav Marohnić wrote:
>> I've been profiling performanc
On E, 2008-10-13 at 02:19 +0200, Mislav Marohnić wrote:
> I've been profiling performance of our app and noticed that all the
> calls to Rails.env.production? (used extensively) are taking rather
> long.
>
>
> After seeing its source, everything was clear:
> http://github.com/rails/rails/tree/2b