similar to: losing validation error messages

Displaying 20 results from an estimated 9000 matches similar to: "losing validation error messages"

2006 Jun 14
3
where to define a struct
Hello, I''m trying to use the following Struct in my web app: UserInfo = Struct.new( "UserInfo", :first_name, :last_name, :email, :domain_name ) I placed this in the environment.rb, thinking that it should be initialized only once. But when I try to access it from within my controller, I get: undefined method `UserInfo'' for #<UserController:0x243ad5c>. so
2006 Jun 28
6
file_column plugin. Storing files outside RAILS_ROOT
I also posted this on Rails Engines forum. Sorry for the double post. I am trying to configure file_column plugin so that it stores the images in a directory completely outside of RAILS_ROOT. I have no problems in storing the files by setting :root_path option. But I can''t get to display these images using ''url_for_file_column''. What I get instead of the image is
2006 Mar 17
2
Validation not working.......
HI, I am new to ruby. I am developing small application in ROR. Following is code for my rHtml , Controller & Model. PLease see it & let me know why data in form is not get validated & also how to check for whether data i have entered in form (username) is present in database or not? (Like Login form). following is my code:- ---index.rhtml-------- <%= start_form_tag(:action
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
Hi all, I am a RoR newbie and have the following scenario set up: There are 2 ActiveRecords involved, the first one being "User", the second one being "Visibility". The corresponding users table holds address informations regarding a User. The visibilities table holds visibility settings for the individual columns of the users table (i.e. firstname, lastname, country
2005 Oct 25
2
generate scaffold ignores controller parameter
Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold <Model> <Controller>" doesn''t take any notice of the controller parameter. Anyone else suffering from this? E.g.: C:\Ruby\work\test>ruby script\generate scaffold User Admin exists app/controllers/ exists app/helpers/ create app/views/users exists test/functional/
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I did: create table categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote
2006 Jul 11
0
text_field_with_auto_complete problem
hello all, I am trying to get a customized text_field_with_auto_complete working where the generated dropdown will display not only the list of teams (first line), but also their city and country(second line). In my view, I have: <p> <label for="team_name">Team: </label> <%= text_field_with_auto_complete :team, :name, {}, :skip_style => true %>
2014 Mar 01
0
Rails controller problems
1. Users_Controller CRUD expects param[:id] to create User instance. With Orders_Controller, I'd like to retrieve a list of users who have ordered. I know Orders_Controller expects param[:id] to be for creating Order instance. So does this mean if I want to retrieve a list of users who have ordered, I should create a method called 'get_orders' in Users_Controller? 2. Can
2006 Feb 14
0
Help with Eager Association
I''ve gotten eager associations to work before, but for some reason this isn''t working out for me this time. I''ve been scratching my head but can''t quite figure out the nuances of what works and what doesn''t work. I''ve got 3 models: profile, widget_configuration and widgets profile.rb -- has_many :widget_configurations
2006 Jun 11
2
Finding a record and showing it -- how?
I''d like to prompt a user for the value of a Name field, then display the record. Rails tells me that it cannot do a find without an ID. I guess it must be that I''m not passing back properly the data from the view to the controller. Thanks for the help joshi The find_user.rhtml view: <div class="find-name-form"> <fieldset> <legend>Enter User
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
2006 Jul 05
1
Newbie SaltedHashLogin add new fields
Hello everyone, with some work i manage to make the SaltedHashLogin works, and it works ok, now i want to use the same table and add some new fields, one picture field so users can load his pictures. So here is my trouble i use mysql and add the new fields, after that i change the line changeable_fields = [''firstname'', ''lastname''], to changeable_fields =
2006 Aug 25
0
Re: login sugar
Well, it turns out that this piece of software requires that a new user call the welcome action. The welcome action changes the user''s state to verified. Once the user is verified, he will be allowed to attempt authentication. The login page actually states this which is useful to me once I read it. I get the URL to the welcome action from the e-mail sent out or the development.log
2006 Apr 14
1
SaltedHashLoginGenerator Integration Woes
I''m trying to modify the SaltedHashLoginGenerator to where it separates the users table into two tables: a users table which contains login info: token, salt, etc) and userprofiles table (which contains firstname, lastname, authlevel, etc) I''m trying to use the existent helper for user under app/helpers/user_helper.rb and copied to app/helpers/userprofiles_helper.rb and
2006 Aug 16
0
sort_link_helper , sorting on date
I am using this helper to sort my table colums, no problem sorting on string but how can I sort a date colum ( in my DB, ) user_helper.rb ---------------------- def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url => {:action => ''list'', :params => @params.merge({:sort => key, :page =>
2003 Feb 25
2
syntax rules
hi, i lost half a day trying to figure out how r is parsing statements in multiple lines. can someone explain (or direct me to documentation) the following. consider the following statements in a program file, say foo.r: a <- 1 + 2; b <- {1 + 2}; {c <- 1 + 2}; d <- c(1, 2); if i do source("foo.r"), i get a=3, b=2, c=1, d={1,2}. according to the r language definition
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
Hi Im trying to link my User model to a Teams model. I seem to be getting the following errors. Any help would be great as Im just new to RoR Thanks error ActiveRecord::AssociationTypeMismatch in UsersController#update Team(#2183395560) expected, got String(#2174675960) app/controllers/users_controller.rb:67:in `update'' app/controllers/users_controller.rb:66:in `update''
2011 May 17
1
rails render_to_string problem
Hi I`m trying to test my controller with rspec and always get an error. The error is in the render_to_string method call (without it test works fine). So could u please help me with that? users_controller.rb: def update @user.update_attributes!(params[:user]) redirect_to @user, :status => 202, :text => render_to_string(:partial => "users/show", :type =>
2009 May 22
1
rails 2.3.2, active scaffold, nested, ActionView::TemplateError (undefined method `format_column' for #<ActionView::Base:
Before I dig in any further (since I have no idea where to go from here...) Has anyone been succcessful with 2.3.2, AS, and nested scaffolds? I have the latest of AS and the render_component plugin via % script/plugin install --force git://github.com/lackac/render_component.git -r rails-edge I have an AS user_controller: active_scaffold :user do |config| ...
2008 Apr 30
1
Admin namespace not working with duplicated action
Hi, I have decided to setup my Rails app with a public and admin side. To manage a list of users, I have a public app/controllers/users_controller.rb where users can list there friends. And an admin side: app/controllers/admin/users_controller.rb where all registered users are listed and on which I can do some account management. In the routes files I have: map.resources :users