the default destroy route is
/controller/id         , :method=> delete
{:action=>"destroy", :controller=>"sessions", :id=>"name.surname"}

but your destroy action does not need an id really,
the other problem is that you dont need an id but pass

session_path(session[:cas_user])

 and then not use it becuase you do this

session[:id] = nil

im not user if yo want to do this

session[:cas_user] = nil



On Mon, Sep 13, 2010 at 9:54 AM, radhames brito <[email protected]> wrote:

> you dont need to pass this session[:cas_user]
>
>
>
> On Mon, Sep 13, 2010 at 7:53 AM, Mauro <[email protected]> wrote:
>
>> In routes.rb I've put:
>>
>> resources :sessions
>>
>> controller is:
>>
>> class SessionsController < ApplicationController
>>
>>  def destroy
>>   session[:id] = nil
>>   session.delete(:casfilteruser)
>>   CASClient::Frameworks::Rails::Filter.logout(self)
>>  end
>>
>> end
>>
>> In application.html.erb I have:
>>
>> <%= link_to 'Logout', session_path(session[:cas_user]), :method => :delete
>> %>
>>
>> I think it's all but:
>>
>> No route matches {:action=>"destroy", :controller=>"sessions",
>> :id=>"name.surname"}
>>
>> What I've missed?
>>
>> --
>> 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]<rubyonrails-talk%[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