Hi, I trying to mount an App but with separetaed model, controller and view in otrher files. Waht could I do? How these files must be?
You need to create a custom config.ru: config.ru: require_relative ''app1'' require_relative ''app2'' map ''/app1'' do run App1 end map ''/app2'' do run App2 end // Magnus Holm On Wed, May 22, 2013 at 2:05 PM, l?zaro <netadmin at lex-sa.cu> wrote:> Hi, I trying to mount an App but with separetaed model, controller and > view in otrher files. Waht could I do? How these files must be? > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20130522/92b9779f/attachment.html>
That will allow you to host two apps via a single config file. To separate out your MVCs, try this: -- myapp.rb -- %w(camping).each { |lib| require lib } Camping.goes :MyApp %w(helpers models views controllers).each { |lib| require lib } module MyApp ... end -- models.rb -- module MyApp::Models ... end -- -- And so on for helpers.rb, views.rb and controllers.rb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20130522/9e2a44d1/attachment.html>
I''ll try it... thanks Thread name: "Re: mounting multiples app" Mail number: 1 Date: Wed, May 22, 2013 In reply to: David Susco> > That will allow you to host two apps via a single config file. To separate out > your MVCs, try this: > > -- myapp.rb -- > > %w(camping).each { |lib| require lib } > > Camping.goes :MyApp > > %w(helpers models views controllers).each { |lib| require lib } > > module MyApp > ... > end > > -- models.rb -- > > module MyApp::Models > ... > end > > -- -- > > And so on for helpers.rb, views.rb and controllers.rb> _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list-- -------- Warning! ------------ 100''000 pelos de escoba fueron introducidos satisfactoriamente en su puerto USB.