Displaying 9 results from an estimated 9 matches for "session_path".
2006 Aug 03
0
setting a session variable, :value and :session_path
Hello,
I''m having some difficulty with using sessions. Basically, I''d like to be
able to store a hash in an action:
def action
session[:details] = {:value => some_hash, :session_path => "/main"}
end
I''d like to be able to retrieve the hash in another action under the same
"main" controller. I retrieve it by doing the following:
def action2
hash = session[:details]
v1 = hash[:name] # Problem is that this is null
end
I''m not able...
2009 Sep 29
10
rails 2.3.3 upgrade shows error
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
any ideas ?
Application works fine with rails 2.1.0
Sandip
--
Ruby on Rails Developer
http://funonrails.wordpress.com
www.joshsoftware.com
http://brandpotion.com (Latest project released)
--~--~---------~--~----~------------~-------~--~----~
2008 Feb 09
1
how to check the config.action_controller.session options ?
...=> ''3a64394bb895f1f05e0c07f71127d93d''
}
I cannot get it back in the script/console ..
:session_key=>"_session_id" !!!
why ?
>> ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=> {:session_key=>"_session_id", :cookie_only=>true, :session_path=>"/",
:prefix=>"ruby_sess.", :database_manager=>CGI::Session::CookieStore,
:tmpdir=>"/Users/myself/tmp/sessions/"}
how can get back the :session_key and :secret in my controllers ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------...
2006 Aug 03
0
Setting session variables and expiration issue.
Hello,
I''m having some difficulty with using sessions. Basically, I''d like to
be able to store a hash in an action:
def action
session[:details] = {:value => some_hash, :session_path => "/main"}
end
I''d like to be able to retrieve the hash in another action under the
same "main" controller. I retrieve it by doing the following:
def action2
hash = session[:details]
v1 = hash[:name] # Problem is that this is null
end
I''m not abl...
2010 Sep 13
13
what I've missed in routes.rb?
...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 G...
2007 Oct 22
1
View spec response has no content?
...rts''})
response.should have_tag(''a'', :attributes => {:href => users_path, :text => ''Users''})
end
it ''should display a logout link'' do
response.should have_tag(''a'', :attributes => {:href => session_path, :text => ''Logout''})
end
end
describe ''/main/index GET'' do
before(:each) do
User.current = User.new
render ''main/index.html.haml''
end
it_should_behave_like ''backoffice layout implementor''
end
Here'...
2011 Jun 13
0
Devise Authorization Error
...) ---
<div class="login_container">
<div class="title_container">Administrator Login</div>
<div class="content_container">
<%= flash[:notice] %>
<%= flash[:alert] %>
<%= form_for(resource, :as => resource_name, :url =>
session_path(resource_name), :html => {:id => :admin_login_form}) do |
f| %>
<table width="100%" cellpadding="2px" cellspacing="0px"
border="0px">
<tr>
<td width="50%">
<%= f.label :email %>
</td>
<...
2010 Jul 13
1
NoMethodError in UsersController#show
...login"=>"session",
"password"=>"admin",
"commit"=>"Log in"}
Why is login being set to "session"? Instead of the real login?
This is my form:
<fieldset>
<div class="yui-g" >
<% form_tag session_path do %>
<p><label class="block" for="login">Login</label>
<%= text_field_tag ''login'' %></p>
<p><label class="block" for="password">Password</label>...
2008 Jul 01
8
redirect_to not working
Hi... I have a basic authentication system. I have a RESTful resource
called session with the following code when logging in:
def new
end
def create
user = User.authenticate(params[:username], params[:password])
respond_to do |format|
if user
session[:user_id] = user.id
flash[:notice] = "Welcome back #{user.name}!"
format.html {redirect_to