Forum: Ruby on Rails adding multiple users to my site ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
47c3920e98510f592b2e8dcf8bbaf07f?d=identicon&s=25 surfivor (Guest)
on 2007-02-09 11:11
(Received via mailing list)
I have a site I set up for my band. Basically the main page URL is of
the form:

myband is a method in the main controller

I am thinking of setting it up so many other bands can be on the site
and so it could end up like this: .However, I am thinking I am lazy and
it will cause subversion to have different files from the way I had it
before all over the place and I have to figure all that out. Changin
the directory structure while the site is allready working may mess
something up that I diodn't realize and it may take me awhile to
straighten it all out.
I did think by adding a /bands directory I could set up a base class
in there to verify which band, but it doesn't seem critical to do

 I figure it would be just as easy to do it like this:

then I don't have to bother restructuring my directories.

Maybe that's all a dumb question, I don't know. I have only been doing
Rails for several months and come from more of a C++ development
setting than web stuff.
3d1a70ebd35ac970e009e01599603b46?d=identicon&s=25 koloa (Guest)
on 2007-02-09 12:36
what i found out recently that using the power of the routes.rb makes
everything MUCH easier. using it, i trimed off maybe 60 percent of my

would it look better if your url looked like this...

in the routes.rb you can set something like

map.connect ":band/:title", :action => "myband", :controller "main"

and then you can

def myband
   @myObj = Band.find(:first, :conditions => ["title =

see gregs post in

to convert bandtitle to a url so it will look like
Bfb4faac1ebe6bcd236d65cf98428632?d=identicon&s=25 reed (Guest)
on 2007-02-10 02:49
(Received via mailing list)
I don't know the answer to your question but had to add my $0.02 ;-)
Sounds like you are using a canon to swat a fly.

If you are wanting to get this sorted out quickly there are plenty of
content management systems around that would let you host multiple
bands websites on the same site.

However if you are wanting to do this in ruby and you are displaying
the same kinds of information about each band then I suggest that you
use a database to store the band info.
47c3920e98510f592b2e8dcf8bbaf07f?d=identicon&s=25 surfivor (Guest)
on 2007-02-10 03:40
(Received via mailing list)
On Feb 9, 6:36 am, koloa <> wrote:
> map.connect ":band/:title", :action => "myband", :controller "main"
> to convert bandtitle to a url so it will look like
> --
> Posted via

 I did it like this which seems to work well, but maybe there is an
easier way as I had to map each individual action

 map.connect ':band_name', :action => 'show_band', :controller =>
  map.connect ':band_name/list_gigs', :action =>
'list_gigs', :controller => 'main'
  map.connect ':band_name/show_bio/:id', :action =>
'show_bio', :controller => 'main'
  map.connect ':band_name/show_gig/:id', :action =>
'show_gig', :controller => 'main'
  map.connect ':band_name/bio_menu', :action =>
'bio_menu', :controller => 'main'
  map.connect ':band_name/list_gigs', :action =>
'list_gigs', :controller => 'main'
  map.connect ':band_name/rss_menu', :action =>
'rss_menu', :controller => 'main'

  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action/:id'
47c3920e98510f592b2e8dcf8bbaf07f?d=identicon&s=25 surfivor (Guest)
on 2007-02-10 03:47
(Received via mailing list)
On Feb 9, 8:48 pm, "reed" <> wrote:
My band has a site on myspace that I put up:

Then we had an older site someone did but the guy who did the site is
on the other coast and only
he can update the site or something: . So
nothing much ever happens with it.

I am building this site: with Rails. It has a
database and an admin section so that the shows can
be entered which it google maps the shows based on what was entered by
the admin. It has a tinyMCE content editor for the
bios. I will add some other stuff. The front part of the site is some
ajax stuff. Some musician friends of mine also need web sites and
don't have alot of money, so I am setting my site/database to handle
multiple bands besides my band. If I do that, I might as well look
into hosting other bands and maybe making a little cash or something,
but it's ben fun at any rate.
This topic is locked and can not be replied to.