I am putting up a tool that connects to a subversion repository and checks latest revision and downloads the changeset log for all the changes made since last check and puts inside a hash for various uses inside the code. I am just wondering if the code that checks the subversion repo and reads it''s data should bolong to a controller of it''s own or a model of it''s own. Model feels the right thing to do but I am unsure how a model reacts when it doesn''t find a table to connect to. If it runs slower because of some inner checks. Or mabey I should generate a completely new set of stuff like Collaboa does by creating a ActionSubversion system(Their''s just didn''t fit my needs). Any thoughts? -- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
>>>>> "Jon" == Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com> writes:> Model feels the right thing to do but I am unsure how a > model reacts when it doesn''t find a table to connect to.Doing that is one of the recipes in the "Rails Recipes" book. -- Calle Dybedahl <calle@cyberpomo.com> http://www.livejournal.com/users/cdybedahl/ "Run little fishies! Run like the wind!" -- Steve McAndrewSmith, A.S.R
Doesn''t that tutorial show you how to create a databaseless app? I''m only havingthis small part without a database. But this is a simple case of that I didn''t see the forrest because of all the trees. I realised that I was being stupid and simply created a class called subversion inside a file in lib/subversion.rb. I was focusing too much on the model infrastructure and didn''t realise that I wasn''t using anything really that needed the model or controller system at all. Silly me. On 6/2/06, Calle Dybedahl <rails@cyberpomo.com> wrote:> >>>>> "Jon" == Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com> writes: > > > Model feels the right thing to do but I am unsure how a > > model reacts when it doesn''t find a table to connect to. > > Doing that is one of the recipes in the "Rails Recipes" book. > > -- > Calle Dybedahl <calle@cyberpomo.com> > http://www.livejournal.com/users/cdybedahl/ > "Run little fishies! Run like the wind!" -- Steve McAndrewSmith, A.S.R > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
J?n Borg??rsson wrote:> Doesn''t that tutorial show you how to create a databaseless app? I''m > only havingthis small part without a database. > > But this is a simple case of that I didn''t see the forrest because of > all the trees. I realised that I was being stupid and simply created a > class called subversion inside a file in lib/subversion.rb. I was > focusing too much on the model infrastructure and didn''t realise that > I wasn''t using anything really that needed the model or controller > system at all. > > Silly me. > > > On 6/2/06, Calle Dybedahl <rails@cyberpomo.com> wrote: >> "Run little fishies! Run like the wind!" -- Steve McAndrewSmith, A.S.R >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > --Models don''t need databases either. A model is simply any class that represents a type data, and the methods to CRUD that data. you can just create a app/models/subversion.rb with this in it: class Subversion def foo #... end end As long as it doesn''t inherit form Active Record it won''t try to find a database table. -- Posted via http://www.ruby-forum.com/.