similar to: AJAX Preview & Edit Page Problem

Displaying 20 results from an estimated 600 matches similar to: "AJAX Preview & Edit Page Problem"

2006 Feb 27
4
update_attribute with Validation?
Does anyone know of a way to update individual attributes with validation? update_attribute disables the validation checks in the record model, so I''m wondering if there''s a workaround for this. In my application, I want to allow the user to update some or all the attributes without having to enter :password and :password_confirmation, both of which are subject to
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am trying to make sure 2 passwords are equal (cleanly the rails way).. In my view i have two fields with id user[password] and user[password_confirmation]. in the model i have validates_confirmation_of :password, :message =>"Passwords do not match " Am i missing something here ? thanks adam
2006 Apr 03
4
page.visual_effect :highlight not working
I just upgraded Ruby to 1.8.4 and Rails to 1.1 and I''m in the middle of changing my Javascript code over to the Scriptaculous helper functions. page.visual_effect :highlight, "some_div" seems to be broken. Instead of fading, the background color of the element stays highlighted. page.visual_effect works for other effects, though. Any ideas? Thanks. -- Posted via
2006 Mar 04
3
:class in link_to_remote?
Is there a way to set the class of a link in link_to_remote? I tried adding :class => "this_damn_class" after the :url hash and it didn''t work. I went ahead and did it manually using remote_function, i.e. <a class="this_damn_class" href="#" onclick="<%= remote_function ..., :url => {...} %>">My Link</a> -- Posted via
2006 Jul 15
1
Redirect_to from initialize method
Hello, I''m curious as to why this bit of code doesn''t work: -- class SignupController < ApplicationController def initialize signup.call end def signup redirect_to :action => "signup_form" end end -- You have a nil object when you didn''t expect it! The error occured while evaluating nil.rewrite -- Whereas if I comment the
2005 Jul 13
0
Testing failing
So I''m trying to be a good agile programmer and write unit tests for my objects, but I''ve got a test I just can''t keep from failing. I have a profile object that I just added username and hashed_password to. I used the method in the Rails book to handle hashing the password. My code is strait out of the book. The whole object is at the end of this email. I want
2006 Apr 21
2
destory Test Case Messes up all tests
I am trying to create unit tests for my users model but when I add a test that destroys a user, that user is not available in any of the other test. If I remove the test that destroys the user all my other tests work again. All the fixtures are suppose be reloaded between tests right? Here is my testcase : require File.dirname(__FILE__) + ''/../test_helper'' class UserTest
2006 Jun 05
2
When adding a record in console, a parameter comes in as null even when I set it
In console, I am trying to create a User but the :account_id does not come in. Console just gives me back :account_id => nil. Obviously I''m trying to set it though. Silly console... But, I can set the account_id column in my controller like so: @user = User.new(params[:user]) @user.account_id = account.id @user.save Here''s what I give to the controller: User.create :name
2006 Jun 16
2
Problem with User Login from Agile Web Development
I am trying to use an expanded version of the User Login from the Agile Web Development with Rails book. It takes the user name and password but then says "Invalid user/password combination". Looking at the log everything seems to be fine until it sends the query to MySQL. The query shows that the name is '''' instead of the name that was passed to the self.login
2006 Mar 04
4
Two quick newbie questions
2 quick questions regarding authentication ... 1) the flash[:notice] on successful login looks completely wrong to me. How should it be done? def index if request.post? @user = User.new(params[:user]) authentic_user = @user.attempt_login if authentic_user session[:user_id] = authentic_user.id flash[:notice] = ''Login successful! Welcome
2006 Apr 05
0
Tests creating output?
Hi everyone, I have this code in Person.rb: def hashed_password(password) require ''digest/sha1'' require ''base64'' new_password = Digest::SHA1.new new_password << password new_password = "{SHA}" << Base64.b64encode(new_password.digest).chop end And here''s my test: def
2006 Jul 06
1
Form not inserting data into database
I have a form to register a user. The issue I am having is the fact that it only populates login, hashed_password and created_at fields. DB table: create table users ( id int not null auto_increment, login varchar(100) default null, hashed_password char(40) default null, email varchar(255) default null, salt varchar(255) default
2007 Jul 09
3
NoMethodError when using find_by_sql
I''m try to verify users on login. Here is my code: def self.authenticate(username,password,account_code) employee = self.find(:all, :select => "e.id, e.first_name, e.last_name, e.username, e.account_id, e.department_id, o.pay_type_id, o.admin_yn, o.payroll_yn, o.files_yn, o.dept_report_yn,e.salt, e.hashed_password", :conditions => ["e.deleted_yn=0 and
2006 Jul 06
1
Problem implementing password and password confirmation
Hi, I''m trying to implement password confirmation, based on the Agile example, but just can''t make any progress. User DB has these fields: ========================= t.column :name, :string, :limit => 40 t.column :hashed_password, :string t.column :salt, :string User model has: =============== attr_accessor :password_confirmation
2010 Apr 26
2
woriking under webrick but not under passenger
Hi! I have just added login feature to my rails application (followed the instruction from (Agile Web Development with Rails) but now I am getting strange errors (looks to me like some kind of routing problem) under the passenger/apache. The error is: 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. From the log:
2007 Mar 12
0
Undefined method: hashed_password ?
I bought the Agile book to learn Rails, and everything was going smooth until Iteration F1: Adding Users. I''ve double checked my code, used the code provided by the book, and still it returns this same error message: **** NoMethodError in LoginController#add_user undefined method `hashed_password='' for #<User:0x473f0d8> RAILS_ROOT: ./script/../config/.. Application
2006 Jul 16
0
Problems with validates_lenght_of
I''m building a login system, and I want users to be able to update their password, first name and last name after signing up. So, when signing up password can''t be nil, and it must be between 6..20 characters long. However, on update, the user can choose to leave the password field empty (but fill in other stuff, like first name) and then I want the User model to not update
2019 May 22
0
weakforced: Possible to access the ip address of report/allow?
From dovecot, you can add any additional attributes you like using the auth_policy_request_attributes configuration setting, e.g. By default in 2.3.1 this looks like: login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} device_id=%{client_id} protocol=%s But you can add additional parameters: login=%{requested_username} pwhash=%{hashed_password} remote=%{rip}
2006 Feb 15
8
Agile book - getting confusing error
Working through the beginning phase from the Agile book on ''Administration'' undefined method `hashed_password='' for #<User:0xb7911324> ... /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1498:in `method_missing'' #{RAILS_ROOT}/app/models/user.rb:12:in `before_create''
2007 Nov 25
4
is notify resevered word?
Hi, When I added this association... class User < ActiveRecord::Base has_one :notify end ...and tried then to update column in User table it will call queries for notify table automatic? Output --------------------------------------------------------------- User Columns (0.041488) SHOW FIELDS FROM `users` User Load (0.001544) SELECT * FROM `users` WHERE (`users`.`nickname` =