similar to: sessions

Displaying 20 results from an estimated 1000 matches similar to: "sessions"

2006 Jul 26
1
sessions (newbie problem)
hi! im implementing a login system for a messageboard. tooked from a book. pretty simple. everythings works great, but in the example the idea is, when i want to create a new message, the author name shall be tooked from the session[:user] def create params[:message][:date] = Time.now params[:message][:author_id] = @session[:user].id #here!! @message =
2008 Nov 03
1
Questions about changes to Restful Authentication.
I have a couple of projects with Restful Authentication The first snippet is from the Git repo today and is supposed to be the newer code. # Store the given user id in the session. def current_user=(new_user) session[:user_id] = new_user ? new_user.id : nil @current_user = new_user || false end # Store the given user id in the session. def current_user=(new_user)
2005 May 24
3
textilize/markdown/sanitize for messageboards, oh my!
Hullo, fellow Railsers! (warning: this isn''t a 100% Rails specific question, but I guess it very much applies to what a lot of us are currently doing.) For a project that involves messageboard functionality I''m looking for a good way of sanitizing user input, so the silly fools, err, my wonderful users don''t mess things up too much. I''ve played around with
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi, I just installed Rails 2.0.2 [root@mymachine easyx]# ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] [root@mymachine easyrx]# gem install rails --include-dependencies Need to update 16 gems from http://gems.rubyforge.org ................ complete Successfully installed rails-2.0.2 [root@remandev easyrx]# But I''m getting this error in my restful_authentication
2011 Sep 27
2
passwd problem with new vps
greetings, I am setting up Centos 6 i686 remotely, on a new VPS. A problem I have is that I cannot set password for new users. I have created one with useradd -m new_user but when I type passwd new_user this is the result: [root at vps ~]# passwd new_user Changing password for user new_user New password: Retype new password: passwd: Authentication token manipulation error [root at vps
2006 Jul 27
4
roles based authentication
hi! im trying to implement a role based authentication in my project, but im writing too many conditions, and i think thats not the right way to proceed. i have search in google, but there are a lot of plugins and "tutorials", and they are always not similar, so i dont understand them. please could someone help me? maybe with a easy authentication or with a good/nice tutorial?
2006 Jul 26
6
mongrel_cluster
I''m currently working on 4 different RoR apps all using mongrel cluster and each with their own config file in /etc/mongrel_cluster. I would like the ability to stop|start|restart a single app. Anyone working on something like this? I''d be happy to code it up and contribute this if there''s a need. Basically I would like this: sudo /etc/init.d/mongrel_cluster restart
2006 May 07
1
Overwriting setters for associated objects
Hi all, I''m trying to overwrite a setter method, but am running into some difficulties. This is normally really easy when overwriting a setter for a table column, but in this case it is the setter for an associated object. Here''s a hypothetical example: class User < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base belongs_to :user
2009 Aug 12
5
Challenge for object_id, Garbage Value
I am facing strange problem. I have an object @part=MainPart.find(:all) 1. @part.each_with_index do |mainpart,index| 2. <p><%= mainpart.object_id%></p> 3. end Here problem is that object_id is reserved for rails. Here object_id field in my table . Now i want to get value <%= mainpart.object_id%> is giving GARBAGE VALUE. Is there any solution apart from
2006 Feb 28
3
Object#id will be deprecated?
I didn''t get the memo on this :P members_controller.rb:12: warning: Object#id will be deprecated; use Object#object_id Line 12 is: @member = Member.find(@current_member.id) How _should_ I be writing that line? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2006 May 19
1
validates_presence_of and ajax-forms
Hi. I have "validates_presence_of :login, :password, :firstname, :lastname" in my user-model. I enter the information in new_user.rhtml: <%= error_messages_for(:user) %> <%= form_remote_tag :url => { :action => :register }, :html => { :id => ''new_user'' } %> I have a register.rjs with :fade. Omitting firstname or any other required field
2006 Mar 30
4
Select List to change type of STI class
Hi: I''m trying to create a drop-down list to change the type of a Single Table Inheritance class. I tried this: <%= select :user, :type, [ [''Author'', ''Author''], [''Editor'', ''Editor''], [''Administrator'', ''Administrator''] ]
2009 Jul 21
1
[PATCH server] Fixed db-omatic so it doesn't segfault because of newer qmf api.
--- src/db-omatic/db_omatic.rb | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index 155ff5e..b5b7b81 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -270,10 +270,10 @@ class DbOmatic < Qpid::Qmf::Console end def object_props(broker, obj) - target =
2006 Apr 11
2
Mapping contained objects to forms?
I''m having lots of trouble trying to map an object that contains another object to the right forms param. So say I have Book which has one Publisher. Here is what I''ve tried: <p><label for="book_publisher">Publisher</label><br/> <%= text_field ''book'', ''publisher.name'' %> </p> Then
2005 Dec 28
1
FCGI: warning: Object#id will be deprecated; use Object#object_id?
I am seeing some strange entries in my Apache error log from FCGI that I don''t understand. I have pasted one of the lines below. Anyone seen this or know what might be going on? [Wed Dec 28 08:35:50 2005] [error] [client 24.115.131.100] FastCGI: server "/home/www/apps/appname/public/dispatch.fcgi" stderr: /home/www/apps/appname/app/views/photo/fullsize.rhtml:26: warning:
2011 Mar 15
8
Problems with Object#id deprecation
Hello everyone, in a test helper in my app I call category.id that gets the id of category in the database. However, when running RSpec I get the following error: As a parla customer /Users/saulolopes/code/parla/spec/acceptance/support/paths.rb:13: warning: Object#id will be deprecated; use Object#object_id /Users/saulolopes/code/parla/spec/acceptance/support/paths.rb:13: warning: Object#id
2006 Nov 20
1
undefined method `stringify_keys!' for "4":String - Meaning of this?
Hi, I have the following on a view <% for evaluation in @evaluations %> <td><%=h evaluation[0].name %></td> <td><%=evaluation[1].object_id %></td> <td><%= link_to( "Start", :action =>''evaluatie'', :id => evaluation[1].object_id) %></td> <%end%> When I click on the link, I can see that
2012 Nov 12
3
Updating objects in arrays
Perhaps this is a Rails issue. However, I need to first determine whether I simply am missing something about updating members of an array. I have an array of 10 ActiveRecord objects. I wish to iterate over the array and update an attribute. When I do this the underlying table row changes but the object in the array frequently does not. For example: count = 0 current_entries.each do
2010 Nov 12
3
Updating oVirt Server to the latest Matahari 0.4.0 schema
Hi all, I looked at patching oVirt Server to work with the latest Matahari schema, from Matahari's 'next' branch, version 0.4.0. ovirt-server depends on matahari version 0.0.5, which is currently latest in Fedora, and it is used during Node registration, to enumerate hardware information. Usage extracted from src/host-browser/host-register.rb is as follows: host_list =
2006 Jul 23
6
routes
My best guess at how to make this route map.connect '':user'', :controller => ''user'', :action => ''profile'' makes my link_to :controller => ''admin'', :action => ''index'' stop working ? I''m needing urls like http://localhost:3000/username but without breaking all my other controller index