[Rails] Re: Appointment History template page

2010-10-18 Thread Leonel *.*
IMPROVED. -- ROUTES resources :appointments do collection do get 'history' => 'appointments#index' end end -- CONTROLLER def index if request.request_uri==history_appointments_path #past appointments

[Rails] Re: Appointment History template page

2010-10-18 Thread Leonel *.*
Got it, I think when I restarted the server, it didn't see the changes or something. ROUTES resources :appointments do collection do get 'history' => 'appointments#index' end end CONTROLLER def index if request.request_uri=='/appointments/history' #past appointment

Re: [Rails] Re: Appointment History template page

2010-10-15 Thread Erol Fornoles
What you wanted to do could be achieved by routing: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions HTH On Sat, Oct 16, 2010 at 5:42 AM, Leonel *.* wrote: > > If the history is > > very like your index view then personally I would use a parameter on > > the appointments

[Rails] Re: Appointment History template page

2010-10-15 Thread Leonel *.*
> If the history is > very like your index view then personally I would use a parameter on > the appointments controller that just causes the appropriate records > to be selected. If you think of the history view as being completely > different then do it with it's own controller. This is what I