Adding multiple users to my site?

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.

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

On Feb 9, 6:36 am, koloa [email protected] 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’

I don’t know the answer to your question but had to add my $0.02 :wink:
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.

On Feb 9, 8:48 pm, “reed” [email protected] 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.