similar to: reset_session when Ruby goes down

Displaying 20 results from an estimated 900 matches similar to: "reset_session when Ruby goes down"

2006 May 30
3
extra attributes in habtm
Hi, Posting here since issue tracking isn''t the best place to discuss. I can understand habtm is moving towards deprecating support for extra attributes in join_table, and to use :through for those cases instead. To clarify, patch<http://dev.rubyonrails.org/attachment/ticket/5216/habtm_join_table_test.patch1.diff>for #5216 <http://dev.rubyonrails.org/ticket/5216>
2006 Aug 10
3
Radio buttons refusing to load checked...
Hi, Having big problems with radio buttons that just don''t make sense: <%= radio_button "events", "impact_type", true %> Positive <%= radio_button "events", "impact_type", false %> Negative This should create two radio buttons with the first one checked by default, right? Cos it doesn''t :( Any ideas would be great, Thanks,
2006 Aug 09
7
changing find method
Hi, i was wondering if there was a nice clean way(after all, it is ruby) to change the find method of a certain model/class (Page) so that if i wanted to use a find method on a @page instance it would return only specific rows from the table(if the page.published == true/false: the pages table looked like SQL: ... id int not null auto_increment, published tinyint(1) not null, something
2006 Jul 17
1
FF1.0 + Prototype Ajax not working in 0.3.13.x
Hi guys, I have a funny problem that only occurs in FF1.0.x but works fine and dandy in FF1.5. I''d thought its me screwing up with the JS... but even this " What time is it <http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html>" doesn''t work with until I downgrade to Mongrel 0.3.12.4. I don''t like/use FF1.0 too.. but too bad for me
2007 Jun 29
0
acts_as_authenticated, reset_session, and redirect_back_or_default
Just a question and an FYI I just installed rails and acts_as_authenticated and was setting up a site. Everything works fine except that in the AccountController that I generated the calls to the routine redirect_back_or_default don''t work because the call just before it to reset_session clears the session[:return_to] that the method uses to set where it will redirect. I ended up adding
2006 May 18
1
mime yaml
First off, apologies if this is addressed.. I didn''t find anyone having the same problem (which usually means the problem is me!) I''m running the standard command to start a Rails server, with additional custom mime YAML: mongrel_rails start -m /etc/mongrel_mime.yml Content of the /etc/mongrel_mime.yml is only a single line: .xml: text/xml However, the custom mime
2006 Jun 14
0
krjs plugin: a different way of doing RJS
Hi guys, Just wrote a simple plugin, krjs<http://plugins.radrails.org/directory/show/70>, that introduces kind of a VB-event-style of writing RJS apps. You introduce Ajax behaviors into your application by defining event handlers ( e.g. on_form_submit, on_password_change) in your controllers instead of explicitly doing remote_form_tag or link_to_remote in the views templates.
2006 Jun 23
9
Connecting MQ from Rails ??
Hi all, I want to Connect to IBM MQ from Rails/Ruby, can it be done? and get the messages from the Queue, then i want to use this message in ruby/rails. Is there a direct way of doing the above job?? If so any packages are available? If there is not a way currently, and any thoughts of how we can do the above job indirectly through some other means or round about ways or workarounds can be
2006 Jul 10
1
Redirects and keeping flash
My code that acts if a session has timed out looks like this: reset_session session[:expires_at] = nil # TODO - This flash is never shown, because we redirect maybe? flash[:error] = ''Your session has timed out, please login to continue.'' # An attempt to make flash stick around, not working flash.keep redirect_to :controller => ''security'',
2006 May 02
2
flash not shown
I am using the following code (inspired by one of the books) to check if the user''s session should have timed out. # Check to see if the user has been inactive for longer than the # expiry period. If they have, reset the session. def check_timeout if session[:expires_at] != nil @time_left = (session[:expires_at] - Time.now).to_i unless @time_left > 0
2006 Jun 16
10
Issue with caching of .PNG files in IE..
I''m running a Rails application with WEBrick server. We are displaying an Image from the server to the Client (Browser). First time on the browser everything looks fine, upon clicking the link, it contacts the server and displays in IE brwoser the image that was stored on the server. But in case if the image gets changed on the server(File Name being the same), then even though i
2006 May 17
3
What am I missing?
There''s got to be a simple answer to this... def logout reset_session flash[:notice] = "Logged out" redirect_to :action => ''index'' end The flash never shows up, and doesn''t seem to be in the new session. --Al Evans -- Posted via http://www.ruby-forum.com/.
2009 Jun 19
1
Session Reset when clicking back button of the browser
hi friends... here is my query.... kindly give ur views pls... after logging into the application,i redirect to company list page.now when user clicks the browser back button it should show the login page.that is i want to destroy the session.so in my login controller i have written code below. def log_in if request.get? reset_session end end in my routes.rb map.root :controller =>
2006 Jul 07
4
need help with some ugly code - is there a better way?
Hi, In my user_controller.rb, I have the following method, which is supposed to send the user to their profile, dependng on what "role" they are (the roles correspond to the other controllers: venue, band, fan): def login if request.post? if session[:user_id] = User.authenticate(params[:user][:login], params[:user][:password]) flash[:message] =
2007 Oct 05
7
Trouble with text_field_tag
I am trying to implement a basic login page: login.rhtml 1 <fieldset> 2 <% form_tag do %> 3 <label for="name">Name:</label> 4 <%= text_field_tag :name, params[:name] %> 5 <label for="password">Password:</label> 6 <%= password_field_tag :password, params[:password] %> 7 <%= submit_tag
2006 Aug 10
1
Passing parameters defined in a function or something
Hi, I have method I want to call ... it can receive * number of parameters. I also have 3 parms that I want to pass often, so I have defined them in a separate function: def my_params { :parm1 => 1, :parm2 => 2, :parm3 => 3 } end And I want to call my method like this: mymethod :parm4 => 4, my_params Now - this doesn''t work - as my_params is a hash of params, which
2007 Mar 06
1
Smart forms in Rails?
I am working on a project that needs a "Smart Form" type of system. That is, we need to have a Form Template system that chooses what elements of the form are displayed based on how the user answers other elements of the form. Does that make sense? Can anyone point me in the right direction? -- Posted via http://www.ruby-forum.com/.
2007 May 23
3
User Login (process_login)
Hiya - before I start let me tell you i''m a Nuby on Rails. I''ve created a user registration within my application that requires email validation and that seems to be working fine. I''m now creating the user login page and have the following code in my UsersController: def login @user = User.new @user.username = params[:username] end def
2005 Feb 22
2
RE: Relocating the directory for ruby_sess.* files
Please, someone can tell me where session data are stored on Windows, using Webrick in its default configuration? After storing an object into @session, I initially can access only the controller that has stored the object. Otherwise, the html page displays "Not found" and the Webrick console displays: #<ActionController::SessionRestoreError: Session contained objects where the
2008 Mar 07
0
ActiveRecordStore: cleanup & avoiding duplication
Hi, I''m using ActiveRecordStore to track user sessions. I''ve used as a base the next sources: - http://blog.levicole.com/articles/category/ror - http://matt-beedle.com/2006/12/13/rails-how-to-find-out-who-is-online/ - http://www.williambharding.com/blog/?p=99 This is what I currently do: IN SESSION CONTROLLER def create self.current_user = User.authenticate(params[:login],