Bruno,

Thanks for the info.

If you get a few free minutes,
please post a few sentences or some routing code which
routes /params to the posts/show method.

This might a bit of a task though; I'm not sure.

It looks like many hours were used to construct desert_routes.rb

--Audrey


On Nov 21, 6:03 am, Bruno Bornsztein <[email protected]>
wrote:
> > It looks like desert_routes.rb wants to live under vendor/
>
> To create routes for your Rails app, you need to put them in
> config/routes.rb (like any normal app).
>
>  > I made a very tiny change to desert_routes.rb:
>
>
>
>
>
> > > resources :users, :member_path => '/usr/:id', :nested_member_path => '/
> > > usr/:user_id', :member => {
>
> > > Then I added 1 line to routes.rb:
>
> > >   map.connect '/*pkey', :controller => 'posts', :action =>
> > > 'pkey_show', :conditions => { :method => :get }
>
> > > After coding up .pkey_show() and adding a template for it,
> > > I am happy.
>
> > > Now, if I go to this URL:
>
> > >  http://localhost:3000/abc123xyz
>
> > > I see a post (or not) rather than a user.
>
> Just for the record, in case other people come along and see this; this is
> not a recommended approach to customizing a CE app. You're going to
> encounter lots of errors due to the fact that you're routing /params to
> posts/show instead of users/show.
>
> If your goal is to have blog posts routed to /params (though I don't
> recommend it), there are better ways to do it.
>
> Thanks,
> Bruno

--

You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=.


Reply via email to