Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. How do you deal with those? Historically, I''ve created a "contents" controller, and had urls like these: http://my.url/contents/show/front http://my.url/contents/show/about where front and about is the id of a row in the contents table. But I''m sure there''s a better way. It would be better to have the ''front'' content be displayed at http://my.url/ and the ''about'' content be displayed at http://my.url/about. I''d have to add routes for each special case, right?
i do exactly that with a content controller. Then inside my layout i just do a <%= render_component %> on the Content controller and use whatever action is appropriate for that piece of code (main,footer,etc..) Seems to be the easiest way, plus all your non-layout content is in one place. adam On Aug 28, 2005, at 2:33 AM, Joe Van Dyk wrote:> Most websites have somewhat "static" pages like "About Us", > "Contact Us", etc. > > How do you deal with those? > > Historically, I''ve created a "contents" controller, and had urls > like these: > http://my.url/contents/show/front > http://my.url/contents/show/about > where front and about is the id of a row in the contents table. > > But I''m sure there''s a better way. It would be better to have the > ''front'' content be displayed at http://my.url/ and the ''about'' content > be displayed at http://my.url/about. I''d have to add routes for each > special case, right? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >
On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > How do you deal with those? > > Historically, I''ve created a "contents" controller, and had urls like these: > http://my.url/contents/show/front > http://my.url/contents/show/about > where front and about is the id of a row in the contents table. > > But I''m sure there''s a better way. It would be better to have the > ''front'' content be displayed at http://my.url/ and the ''about'' content > be displayed at http://my.url/about. I''d have to add routes for each > special case, right?If you''re on edge rails, I have a component for this very purpose: Supasite. http://projects.techno-weenie.net/supasite (that whole site is powered by it). Pages are modified through an admin area and saved in the database. It uses a catch-all route so you can have pages like /about_us or whatever. I''m using it one of my applications with some custom code that turns on caching, and restricts pages to a subdomain. -- rick http://techno-weenie.net
On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > How do you deal with those? > > Historically, I''ve created a "contents" controller, and had urls like these: > http://my.url/contents/show/front > http://my.url/contents/show/about > where front and about is the id of a row in the contents table. > > But I''m sure there''s a better way. It would be better to have the > ''front'' content be displayed at http://my.url/ and the ''about'' content > be displayed at http://my.url/about. I''d have to add routes for each > special case, right?Why not create an about, or company controller? URL''s like /contents/show/front sounds like your creating more of a CMS.
On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > How do you deal with those?> But I''m sure there''s a better way. It would be better to have the > ''front'' content be displayed at http://my.url/ and the ''about'' content > be displayed at http://my.url/about. I''d have to add routes for each > special case, right?I would agree that this is logical. I have special routes for those pages on my own site: the default route, and one for ''about''. Sincerely, Tom Reinhart tom-V0YqjHVuocLQT0dZR+AlfA@public.gmane.org http://AllTom.com/
I am adding my $0.02 on this: As far as I know, you must add routes for that kind of behavior, yes. Otherwise, how would rails handle the incoming request - if it didn''t know? I have myself also been thinking about this lately. And so far my solution looks like yours. I create a "static" controller; info, contents, about or similar. Then I route requests on a top level manually to this controller, just like you proposed. ------------------------------------------------------------------------ /*Ronny Hanssen*/ Joe Van Dyk wrote:> Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > How do you deal with those? > > Historically, I''ve created a "contents" controller, and had urls like these: > http://my.url/contents/show/front > http://my.url/contents/show/about > where front and about is the id of a row in the contents table. > > But I''m sure there''s a better way. It would be better to have the > ''front'' content be displayed at http://my.url/ and the ''about'' content > be displayed at http://my.url/about. I''d have to add routes for each > special case, right? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 8/28/05, James Earl <jamesd.earl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > > > How do you deal with those? > > > > Historically, I''ve created a "contents" controller, and had urls like these: > > http://my.url/contents/show/front > > http://my.url/contents/show/about > > where front and about is the id of a row in the contents table. > > > > But I''m sure there''s a better way. It would be better to have the > > ''front'' content be displayed at http://my.url/ and the ''about'' content > > be displayed at http://my.url/about. I''d have to add routes for each > > special case, right? > > Why not create an about, or company controller? > > URL''s like /contents/show/front sounds like your creating more of a CMS.I just added some routes, so now I have an index_url route that takes uses to http://some.url/ and other routes for http://some.url/about, etc. Seems to work well. Creating controllers for each one of those pages seems like overkill / duplication to me.
On 8/28/05, Tom Reinhart <alltom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > > > How do you deal with those? > > > But I''m sure there''s a better way. It would be better to have the > > ''front'' content be displayed at http://my.url/ and the ''about'' content > > be displayed at http://my.url/about. I''d have to add routes for each > > special case, right? > > I would agree that this is logical. I have special routes for those > pages on my own site: the default route, and one for ''about''.I ended up doing something like map.index '''', :controller => ''content'', :action => ''show'', :name => ''front'' map.connect :name, :controller => ''content'', :action => ''show'', :name => /about|contact/
Nice one Rick! I had a play with Supasite last night and it''s a good alternative to endless pain trying to make a custom web template fit into Drupal/Mambo - instead I fit Supasite to my template v. quickly. Just have to put in a bit of admin authentication :) Cheers, Dan
> > > Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > > > > > How do you deal with those? > > > > > > Historically, I''ve created a "contents" controller, and had urls like these: > > > http://my.url/contents/show/front > > > http://my.url/contents/show/about > > > where front and about is the id of a row in the contents table. > > > > > > But I''m sure there''s a better way. It would be better to have the > > > ''front'' content be displayed at http://my.url/ and the ''about'' content > > > be displayed at http://my.url/about. I''d have to add routes for each > > > special case, right? > > > > Why not create an about, or company controller? > > > > URL''s like /contents/show/front sounds like your creating more of a CMS. > > I just added some routes, so now I have an index_url route that takes > uses to http://some.url/ and other routes for http://some.url/about, > etc. Seems to work well. > > Creating controllers for each one of those pages seems like overkill / > duplication to me.Well, that''s why I suggested Supasite. I had a similar system in an app (empty actions and textile content in the views) and replaced all that with Supasite. Now, my content is in a database, and versioned. Hopefully the patches it requires make it into the next version of rails so that it''s a snap to set up. -- rick http://techno-weenie.net
On 8/29/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/28/05, James Earl <jamesd.earl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > > > > > How do you deal with those? > > > > > > Historically, I''ve created a "contents" controller, and had urls like these: > > > http://my.url/contents/show/front > > > http://my.url/contents/show/about > > > where front and about is the id of a row in the contents table. > > > > > > But I''m sure there''s a better way. It would be better to have the > > > ''front'' content be displayed at http://my.url/ and the ''about'' content > > > be displayed at http://my.url/about. I''d have to add routes for each > > > special case, right? > > > > Why not create an about, or company controller? > > > > URL''s like /contents/show/front sounds like your creating more of a CMS. > > I just added some routes, so now I have an index_url route that takes > uses to http://some.url/ and other routes for http://some.url/about, > etc. Seems to work well. > > Creating controllers for each one of those pages seems like overkill / > duplication to me.Ya, you''re probably right. I was just thinking, if you created one or two controllers as a sort of grouping for the static pages, then you can just throw the static pages under the view. You don''t even have to create methods for them. I''m not sure if this is bad, but Rails will render a view even if it doesn''t have a method defined in the controller.
class StaticController < ApplicationController end static/index.rhtml <%= render_partial @params[''id''] %> routes.rb map.connect ''static/:id'', :controller => ''static'', :action => ''index'' That''s pretty much it. You want an about page, make _about.rhtml and call it with foo.com/static/about, or adjust the routes page accordingly if you wanna bypass the /static/ part. -PJ http://pjhyett.com On 8/29/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/28/05, Tom Reinhart <alltom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 8/28/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. > > > > > > How do you deal with those? > > > > > But I''m sure there''s a better way. It would be better to have the > > > ''front'' content be displayed at http://my.url/ and the ''about'' content > > > be displayed at http://my.url/about. I''d have to add routes for each > > > special case, right? > > > > I would agree that this is logical. I have special routes for those > > pages on my own site: the default route, and one for ''about''. > > I ended up doing something like > > > map.index '''', :controller => ''content'', > :action => ''show'', > :name => ''front'' > > map.connect :name, :controller => ''content'', > :action => ''show'', > :name => /about|contact/ > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
This is great code for a community driven server! You share every file on your hard disk with the world! Geeze> static/index.rhtml > <%= render_partial @params[''id''] %> >domain.com/static/index/<your /etc/passwd in url encoded>/ -- Tobi http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog
Hi Rick. Supasite looks cool, no doubt about it. I have installed it, and I am *almost* there... But, I seem to be unable to view the sections/pages that I am creating. The only change I have from your description is that I had to rename the tables. So instead of doing something that required a lot of code I am using the class table_name_prefix directive, to separate my modules. The base modules are now prefixed with "base_", including the Supasite one. No other code was affected by this (which is just sooo cool btw). I can go into supasite/admin/ and create/edit sections. Currently it looks like this: Supasite --- Sections -- [edit] /about/ [edit] /faq/ create >> Which looks a-ok to me. The /about/ section is defined as follows: Path: about Layout: application Dispatcher: textile I can also enter i.e. /about/ by clicking the link and then I get a list of pages for the about section. In my case I have a page named "About HIVE". I can also edit this page without problems. But, the problem is showing that page (or any other Supasite page). When I am trying the permalink button for the "About HIVE" page this is the results [URL: http://localhost:3000/about/about-hive]: ------- NoMethodError in Supasite/dispatchers/textile#dispatch Showing /supasite/dispatchers/textile/dispatch.rhtml where line #1 raised: undefined method `textilize'' for #<ActionView::Base:0x588a4d8> Extracted source (around line #1): 1: <%= textilize @page.body %> Show template trace (erb):1:in `evaluate_locals'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_view/base.rb:272:in `evaluate_locals'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_view/base.rb:283:in `rhtml_render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `send'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `render_template'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_view/base.rb:173:in `render_file'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:588:in `render_with_no_layout'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in `render_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:591:in `render_with_no_layout'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in `render_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:604:in `render_with_no_layout'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in `render_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:627:in `render_with_no_layout'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/layout.rb:210:in `render_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:757:in `perform_action_without_filters'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:288:in `process'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/components.rb:46:in `component_response'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/components.rb:36:in `render_component'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/components.rb:36:in `component_logging'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/components.rb:36:in `render_component'' /components/supasite/dispatcher_controller.rb:33:in `dispatch_section'' /components/supasite/dispatcher_controller.rb:10:in `dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'' C:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in `dispatch'' script/server:49 Request Parameters: {"args"=>["about-hive"], "id"=>nil, "section"=>#<Controllers::Supasite::Section:0x5892230 @attributes={"id"=>"1", "dispatcher"=>"textile", "path"=>"about", "layout"=>"application"}>} ------- Thanks for your time. ------------------------------------------------------------------------ /*Ronny Hanssen*/ Rick Olson wrote:>>>>Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. >>>> >>>>How do you deal with those? >>>> >>>>Historically, I''ve created a "contents" controller, and had urls like these: >>>>http://my.url/contents/show/front >>>>http://my.url/contents/show/about >>>>where front and about is the id of a row in the contents table. >>>> >>>>But I''m sure there''s a better way. It would be better to have the >>>>''front'' content be displayed at http://my.url/ and the ''about'' content >>>>be displayed at http://my.url/about. I''d have to add routes for each >>>>special case, right? >>> >>>Why not create an about, or company controller? >>> >>>URL''s like /contents/show/front sounds like your creating more of a CMS. >> >>I just added some routes, so now I have an index_url route that takes >>uses to http://some.url/ and other routes for http://some.url/about, >>etc. Seems to work well. >> >>Creating controllers for each one of those pages seems like overkill / >>duplication to me. > > > Well, that''s why I suggested Supasite. I had a similar system in an > app (empty actions and textile content in the views) and replaced all > that with Supasite. Now, my content is in a database, and versioned. > Hopefully the patches it requires make it into the next version of > rails so that it''s a snap to set up. >
Just forget about the previous posting (at the time of writing this it hasn''t arrived yet :(), because I found the problem. I thought that RedCloth was installed by default by RoR. It isn''t. So I installed it (gem install RedCloth) and voila ;) I only have one issue left: If I want to delete sections and pages, is that a manual db-job? ------------------------------------------------------------------------ /*Ronny Hanssen*/ Rick Olson wrote:>>>>Most websites have somewhat "static" pages like "About Us", "Contact Us", etc. >>>> >>>>How do you deal with those? >>>> >>>>Historically, I''ve created a "contents" controller, and had urls like these: >>>>http://my.url/contents/show/front >>>>http://my.url/contents/show/about >>>>where front and about is the id of a row in the contents table. >>>> >>>>But I''m sure there''s a better way. It would be better to have the >>>>''front'' content be displayed at http://my.url/ and the ''about'' content >>>>be displayed at http://my.url/about. I''d have to add routes for each >>>>special case, right? >>> >>>Why not create an about, or company controller? >>> >>>URL''s like /contents/show/front sounds like your creating more of a CMS. >> >>I just added some routes, so now I have an index_url route that takes >>uses to http://some.url/ and other routes for http://some.url/about, >>etc. Seems to work well. >> >>Creating controllers for each one of those pages seems like overkill / >>duplication to me. > > > Well, that''s why I suggested Supasite. I had a similar system in an > app (empty actions and textile content in the views) and replaced all > that with Supasite. Now, my content is in a database, and versioned. > Hopefully the patches it requires make it into the next version of > rails so that it''s a snap to set up. >
On 8/29/05, Dan Sketcher <dansketcher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Nice one Rick! I had a play with Supasite last night and it''s a good > alternative to endless pain trying to make a custom web template fit > into Drupal/Mambo - instead I fit Supasite to my template v. quickly. > Just have to put in a bit of admin authentication :) > > Cheers, > DanThat''s my next tutorial actually. Instead of forcing my own authentication scheme, I thought it''d be best to utilize whatever your application uses. I threw this at the bottom of my application.rb: Supasite::AdminController.class_eval do before_filter :login_required end -- rick http://techno-weenie.net