search for: new_used

Displaying 20 results from an estimated 27 matches for "new_used".

Did you mean: new_user
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)
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
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
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
2007 Aug 02
1
write_attribute functionality for related objects?
Hi. Given: class Group < AR has_many :users end Is it in any way possible to retain reference to the old users when they get replaced using group.users=(new_users) ? The below doesn''t work but illustrates what I''m looking for: class Group < AR has_many :users def users=(new_users) @old_users = users write_attribute(''users'', new_users)
2006 Jul 26
2
sessions
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 =
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
2009 Jun 11
8
before_create return value breaking object.save: rails bug?
I know that usually when people say ''i think i found a bug in rails/ruby'' they''ve done something dumb. I''m wondering if this is the case here, but this does seem like a genuine rails bug to me. In my user model i have a few different before_create callbacks. In one of them, if it happens to return false (just because the last statement in it evaluated to
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''] ]
2008 Jan 04
2
Nested Routes + Facebook Resources
Does anyone have nested routes working with the facebook_resources method? My routes.rb has: map.facebook_resources :users do |users| users.facebook_resources :images users.facebook_resources :connections end but user_connections_url won''t generate. "rake routes" gives me: new_user POST /users/new {:action=>"new",
2007 Oct 16
12
Example for attr_accessible?
Is anyone out there writing specs to check attr_accessible fields? I had originally written my spec to check for allowing the desired fields, and then none of the other regular db fields. Unfortunately this isn''t satisfactory, because attr_protected could have been used instead, which of course wouldn''t prevent mass assignment to any whatever=(val) method. I''m thinking
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam Williams and I are working on. We''re in the process of extracting it from a project we are working on so that it can be generally useful to the Rails community. We are calling it "Scenarios". It is a drop in replacement for Rails fixtures: http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2013 Sep 20
1
Automation of puppet configuration code
Hello, I work for the CHTC (Center for High Throughput Computing) at the University of Wisconsin, Madison. We utilize puppet for most of our configuration management. Currently we have a web application that performs the tasks of user account management. When a new user is registered with the application, the application does some very limited parsing of a puppet manifest that has
2006 May 06
0
MyAlbum - photo application
Hi all, I build an application for publishing, organizing and sharing digital photos. To name few features: - upload zip files with many images - copy photos between albums - Ajax editing, comments, ... - drag and drop sorting - slide show - tag albums in categories - have your own site with your public albums - add other users albums in favorites - share albums with other users in forums You
2005 May 17
0
NT domain computer account
...een reading samba sources and I can't quite figure out what 'features' of UNIX account is required for 'workstation account' (as in NT domain). The furthest I coud get to pin-point the requirements, is the pdbedit source (source/utils/pdbedit.c), where we have two functions: 1) new_used(*context, *name, *full_name, *home, *drive, *script, ...); 2) new_machine(*context, *name); Both will create relevant LN/NT passwords as they complete their tasks. Apart from that, 'user' *must* access server-host filesystem, so it definitely needs UID/GID recognized by host kernel. '...
2009 Sep 30
1
2 RESTful controllers for the same resource
Hi everyone I want to have two restful controllers for the same resource (Users) One controller (UsersController) is straight in the controllers folder and is used for singup and so on Then i need another controller for users which is inside an admin folder (Admin::UsersController) In my routes.rb i have map.resources :users # Sample resource route within a namespace: map.namespace
2008 Jan 23
6
sharing specs in a subclass
Hi I''ve spec''d a class and they pass. Now I''d like to assure that any subclass of this class also passes the same specs. Any suggestions for a clever way to handle this? I''d prefer to keep the existing specs as is (eg instead of moving everything into shared behaviors, or doing something to all the ''describe'' lines) thanks linoj
1998 May 14
3
Cannot use smbpasswd for new user
More information on the problem. A couple of days ago I posted a request for help for this error msg terre{testgb}73: smbpasswd Old SMB password: New SMB password: Retype new SMB password: /opt/samba/bin/smbpasswd: machine 127.0.0.1 rejected the session setup. Error was : ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.). This happens only
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday. I would go to the root of my site and I would get a Too Many Redirects message. It seems like there was an infinite loop. After struggling for over an hour yesterday late at night, it seemed like I fixed it. But now, when I want to create a New User, it''s redirecting me to the Sign In screen. Seems like I didn''t fix the problem completely. I
2010 Jan 26
2
accepts_nested_attributes_for :has_many :through => 'bug?'
Hey guys & ladies! I''ve got the following relationship which i''m trying to get accepts_nested_attributes to work with. But when i submit my form, it looks as if its expecting a Company object, rather than an array of companies. which really doesn''t make sense considering its a has_many :relationship. So what i''m after, is a way to