tag:blogger.com,1999:blog-7821856652257554779.post6008096616667123067..comments2025-09-20T09:27:07.510+02:00Comments on Andrzej on Software: Dear Lazyweb: How can I put many classes in one file in a Rails app?Andrzej Krzywdahttp://www.blogger.com/profile/06399276063142826365noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-7821856652257554779.post-43947646438771222422011-01-23T16:09:03.130+01:002011-01-23T16:09:03.130+01:00&quot;It looks like you want to break Rails&#39; c...&quot;It looks like you want to break Rails&#39; convention of &quot;one class per file&quot;.&quot;<br /><br />Yes, I&#39;d prefer to have it possible.<br /><br />I don&#39;t think that this &quot;feature&quot; was ever advertised as a good thing. Was it? I don&#39;t see any value in it.<br /><br />Automatic class reloading in development mode could be implemented even when you have multiple classes per file.Andrzej Krzywdahttps://www.blogger.com/profile/06399276063142826365noreply@blogger.comtag:blogger.com,1999:blog-7821856652257554779.post-25279313646653226302011-01-23T15:43:31.504+01:002011-01-23T15:43:31.504+01:00It looks like you want to break Rails&#39; convent...It looks like you want to break Rails&#39; convention of &quot;one class per file&quot;.Krzysztof Cierpisz (chris)https://www.blogger.com/profile/07838445516755908113noreply@blogger.comtag:blogger.com,1999:blog-7821856652257554779.post-43463293422057896082011-01-22T02:05:15.002+01:002011-01-22T02:05:15.002+01:00I&#39;d love to have the ability to cache classes ...I&#39;d love to have the ability to cache classes in development mode, so that there&#39;s no need to restart the server after the files change. <br /><br />Actually, I could live with that, but I&#39;m not the only developer in this project.<br /><br /><br />&quot;I suspect this will never work when cache_classes = false, since Rails&#39; magic expects to find files named after the class.&quot;<br /><br />I still hope that I can work around this &quot;magic&quot; somehow.Andrzej Krzywdahttps://www.blogger.com/profile/06399276063142826365noreply@blogger.comtag:blogger.com,1999:blog-7821856652257554779.post-44315758787139352402011-01-22T01:58:22.553+01:002011-01-22T01:58:22.553+01:00You say you tried in development mode, thus cache_...You say you tried in development mode, thus cache_classes = false. Have you tried with true, and requiring your files manually?<br /><br />I suspect this will never work when cache_classes = false, since Rails&#39; magic expects to find files named after the class.Anonymousnoreply@blogger.com