Is there an easier way to set up and admin controller in rails other than http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial? This seems like way too much work. Please help if you can. Your help is greatly appreciated. Thank you very much. Kamau Osaze --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Am 27.12.2007 um 19:50 schrieb Kamau Osaze:> Is there an easier way to set up and admin controller in rails other > than > > http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial > ? > > This seems like way too much work. Please help if you can. Your help > is greatly appreciated.I'' am just working on a hotel booking application and I decided to give the administrator own controllers and views. For me it''s easier to maintain. If I use the same template for guests and admins I have a lot of <% if !admin? %> guest things to show <% else %> admin things to show <% end &> ... so I decided to make it this way: app controllers admin bookings_controller.rb guests_controller.rb ... bookings_controller.rb guest_controller.rb ... views admin bookings index.html.erb guests index.html.erb ... bookings index.html.erb guests index.html.erb I have a lot of files but for me it''s easier to maintain 2 templates - allowing me to generate 2 completly different outputs without having lots of if - conditions. -- Jochen Kaechelin figgfrosch.de / gissmoh.de / ror-ror.de / railswerk.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 27, 10:50 am, "Kamau Osaze" <kos...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there an easier way to set up and admin controller in rails other than > > http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-fir...This thread has links to other articles besides Akita''s: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f6c1b3a546e7e240?hl=en In particular, using a single controller with conditional logic is discussed in one article. ///ark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---