Jetzt mach ich bei dem Unsinn mal auch noch mit:
Das hier geht auch:
Rails.root.join('config', 'environments')
Am 08.09.2010 um 11:12 schrieb Marco Scholl:
> Nein. Rails.root liefert ein Pathname object. Da kann man einfach addieren.
>
> Am 8. September 2010 10:55 schrieb Michael Schuerig <[email protected]>:
>> On Wednesday 08 September 2010, Marco Scholl wrote:
>>> Dann sollte man aber Rails.root auch sauber verwenden:
>>>
>>> environments = Dir.entries(Rails.root + 'config' +
>>> 'environments').map{ |env| env[/(.+)\.rb$/, 1] }.compact
>>
>> Dann aber so, oder?
>>
>> Dir.entries(File.join(Rails.root, 'config', 'environments')).map{ |env|
>> env[/(.+)\.rb$/, 1]
>> }.compact
>>
>> Michael
>>
>> --
>> Michael Schuerig
>> mailto:[email protected]
>> http://www.schuerig.de/michael/
>> _______________________________________________
>> rubyonrails-ug mailing list
>> [email protected]
>> http://mailman.headflash.com/listinfo/rubyonrails-ug
>>
>
>
>
> --
> mfg marco
> _______________________________________________
> rubyonrails-ug mailing list
> [email protected]
> http://mailman.headflash.com/listinfo/rubyonrails-ug
--
Thomas R. "TomK32" Koll
just a geek trying to change the world
http://ananasblau.com || http://photostre.am || http://photolog.at
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/listinfo/rubyonrails-ug