2009/12/6 Paulo Coutinho <[email protected]>:
> Hi.
>
> Your solution dont solve.
>
> But i try it:
>
> map.with_options(:namespace => "admin") do |admin|
>       admin.clients_index 'admin/clients', :controller => 'clients' #im on
> admin so dont need redirect to "admin/clients" only "clients"
> end
>
> And to the index(home) action, it is OK, but for the others actions, NO
> (insert/delete/edit).
>
> This solution is near, but have to put all action do controller "clients".
>
> Any ideia?

Oh my mistake ... :)

map.with_options(:namespace => "admin") do |admin|
  admin.clients_index 'clients', :controller => 'clients', :action => 'index'
  admin.clients_edit 'clients/:id/edit', :controller => 'clients',
:action => 'edit'
  admin.clients_insert 'clients/insert', :controller => 'clients',
:action => 'insert',  :conditions => { :method => :post }
end

Hint: Your actions looks to match the resource-pattern


>
>
> --
> Atenciosamente,
> Paulo Coutinho.
> Blog: www.prsolucoes.com/blog
> Site: www.prsolucoes.com
> Msn:  [email protected]
>
>
> 2009/12/6 Kristian Hellquist <[email protected]>
>>
>> > But local and on my server(passenger) it is ok, and function normal, but
>> > on
>> > JRUBY i get an error because it is thinking that "admin" is a controller
>> > and
>> > "clients" is a action of "admin".
>> >
>> > My controllers is not restfull, so what i have to do, to correct it? Or
>> > what
>> > the best method to make the "admin"? I have to put any route?
>>
>> I have an admin section in jruby application. Try to set the routes
>> explicit with an admin namespace.
>>
>> map.with_options(:namespace => "admin") do |admin|
>>  admin.resources :clients
>>  # or in non restful-pattern
>>  admin.clients_index 'clients', :controller => 'admin/clients',
>> :action => 'index'
>> end
>>
>> --
>>
>> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>
>
>
>
> --
>
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to