Hi, I''m working on a Rails application. Recently my client is asking for an admin portal, which should be able to manage ticket as the one for the original one, and have some admin specific features additionally. And their authentications are different, the user portal uses Devise, while the admin portal uses basic HTTP authentication. My intuition prefers to create a standalone Rails project for admin portal, but they do share something like model, and forms. I''m worrying that split the project would break DRY. Does anyone can give me some advices? Thanks. Best regards, Zhi-Qiang Lei zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Hi, maybe you could create a Rails Engine. Take a loot at the Railscasts site http://railscasts.com/episodes/277-mountable-engines Best Regards, Everaldo On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi, > > I''m working on a Rails application. Recently my client is asking for an > admin portal, which should be able to manage ticket as the one for the > original one, and have some admin specific features additionally. And their > authentications are different, the user portal uses Devise, while the admin > portal uses basic HTTP authentication. My intuition prefers to create a > standalone Rails project for admin portal, but they do share something like > model, and forms. I''m worrying that split the project would break DRY. Does > anyone can give me some advices? Thanks. > > Best regards, > Zhi-Qiang Lei > zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hey man, why your admin namespace is using http basic authentication? I think the best thing you can do is use devise with cancan to handle with authorization in your application. Sent from my iPhone On 20/07/2012, at 22:39, Everaldo Gomes <everaldo.gomes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > maybe you could create a Rails Engine. > > Take a loot at the Railscasts site http://railscasts.com/episodes/277-mountable-engines > > Best Regards, > > Everaldo > > On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hi, > > I''m working on a Rails application. Recently my client is asking for an admin portal, which should be able to manage ticket as the one for the original one, and have some admin specific features additionally. And their authentications are different, the user portal uses Devise, while the admin portal uses basic HTTP authentication. My intuition prefers to create a standalone Rails project for admin portal, but they do share something like model, and forms. I''m worrying that split the project would break DRY. Does anyone can give me some advices? Thanks. > > Best regards, > Zhi-Qiang Lei > zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
And about the admin portal feature, you shows set every resource to a namespace called admin. Your routes will look like something like: namespace :admin do resources :tickets end So you should set up a controller inside the namespace admin: Class Admin::TicketsController < Application Controller end Hope this helps you! Regards Sent from my iPhone On 20/07/2012, at 22:39, Everaldo Gomes <everaldo.gomes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > maybe you could create a Rails Engine. > > Take a loot at the Railscasts site http://railscasts.com/episodes/277-mountable-engines > > Best Regards, > > Everaldo > > On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hi, > > I''m working on a Rails application. Recently my client is asking for an admin portal, which should be able to manage ticket as the one for the original one, and have some admin specific features additionally. And their authentications are different, the user portal uses Devise, while the admin portal uses basic HTTP authentication. My intuition prefers to create a standalone Rails project for admin portal, but they do share something like model, and forms. I''m worrying that split the project would break DRY. Does anyone can give me some advices? Thanks. > > Best regards, > Zhi-Qiang Lei > zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Because there is only on admin, and his account will not be in database, and he wants the ability to manage everything. On Jul 21, 2012, at 1:24 PM, thiagocifani wrote:> Hey man, why your admin namespace is using http basic authentication? I think the best thing you can do is use devise with cancan to handle with authorization in your application. > > Sent from my iPhone > > On 20/07/2012, at 22:39, Everaldo Gomes <everaldo.gomes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hi, >> >> maybe you could create a Rails Engine. >> >> Take a loot at the Railscasts site http://railscasts.com/episodes/277-mountable-engines >> >> Best Regards, >> >> Everaldo >> >> On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi, >> >> I''m working on a Rails application. Recently my client is asking for an admin portal, which should be able to manage ticket as the one for the original one, and have some admin specific features additionally. And their authentications are different, the user portal uses Devise, while the admin portal uses basic HTTP authentication. My intuition prefers to create a standalone Rails project for admin portal, but they do share something like model, and forms. I''m worrying that split the project would break DRY. Does anyone can give me some advices? Thanks. >> >> Best regards, >> Zhi-Qiang Lei >> zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >Best regards, Zhi-Qiang Lei zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Thanks, I thought about that. But in this way Admin::TicketsController still cannot share some views of TicketsController well. And due to the name convention, when I use form builder with a ticket, it will use the ticket path without admin prefix defaultly. On Jul 21, 2012, at 1:29 PM, thiagocifani wrote:> And about the admin portal feature, you shows set every resource to a namespace called admin. Your routes will look like something like: > > namespace :admin do > resources :tickets > end > > So you should set up a controller inside the namespace admin: > > Class Admin::TicketsController < Application Controller > > > end > > > Hope this helps you! > > Regards > > Sent from my iPhone > > On 20/07/2012, at 22:39, Everaldo Gomes <everaldo.gomes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hi, >> >> maybe you could create a Rails Engine. >> >> Take a loot at the Railscasts site http://railscasts.com/episodes/277-mountable-engines >> >> Best Regards, >> >> Everaldo >> >> On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi, >> >> I''m working on a Rails application. Recently my client is asking for an admin portal, which should be able to manage ticket as the one for the original one, and have some admin specific features additionally. And their authentications are different, the user portal uses Devise, while the admin portal uses basic HTTP authentication. My intuition prefers to create a standalone Rails project for admin portal, but they do share something like model, and forms. I''m worrying that split the project would break DRY. Does anyone can give me some advices? Thanks. >> >> Best regards, >> Zhi-Qiang Lei >> zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >Best regards, Zhi-Qiang Lei zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Ok! I got it! no problem so on! You can just use devise + cancan and set some specific links in the view that will only shows up if the user is a admin or the other role. What you thing about that? thanks 2012/7/21 Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Thanks, I thought about that. But in this way Admin::TicketsController > still cannot share some views of TicketsController well. And due to the > name convention, when I use form builder with a ticket, it will use the > ticket path without admin prefix defaultly. > > On Jul 21, 2012, at 1:29 PM, thiagocifani wrote: > > And about the admin portal feature, you shows set every resource to a > namespace called admin. Your routes will look like something like: > > namespace :admin do > resources :tickets > end > So you should set up a controller inside the namespace admin: > > Class Admin::TicketsController < Application Controller > > > end > > > Hope this helps you! > > Regards > > Sent from my iPhone > > On 20/07/2012, at 22:39, Everaldo Gomes <everaldo.gomes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > maybe you could create a Rails Engine. > > Take a loot at the Railscasts site > http://railscasts.com/episodes/277-mountable-engines > > Best Regards, > > Everaldo > > On Fri, Jul 20, 2012 at 10:04 PM, Zhi-Qiang Lei <zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Hi, >> >> I''m working on a Rails application. Recently my client is asking for an >> admin portal, which should be able to manage ticket as the one for the >> original one, and have some admin specific features additionally. And their >> authentications are different, the user portal uses Devise, while the admin >> portal uses basic HTTP authentication. My intuition prefers to create a >> standalone Rails project for admin portal, but they do share something like >> model, and forms. I''m worrying that split the project would break DRY. Does >> anyone can give me some advices? Thanks. >> >> Best regards, >> Zhi-Qiang Lei >> zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > Best regards, > Zhi-Qiang Lei > zhiqiang.lei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- thiagocifani http://about.me/thiagocifani <http://thiagocifani.wordpress.com/><http://del.icio.us/thiagocifani> <http://del.icio.us/thiagocifani> -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.