similar to: Clarification on error_messages_for

Displaying 20 results from an estimated 1000 matches similar to: "Clarification on error_messages_for"

2010 Apr 13
2
transpose but different
Hi all, I want to make extra columns in my datafile where the id of every groupmember is mentioned in separate columns. To explain it better see the example: id<-c(1,2,3,4,5,6,7,8,9,10,11,12) group<-c(1,1,1,1,2,2,3,3,3,3,3,3) a<-as.data.frame(cbind(id,group)) a id group 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2006 Aug 16
44
Goodbye for now, RoR
I started a php-based website a few months ago with a buddy of mine on netfirms.com. I was perusing their knowledge base and I came upon a quick-start for something called Ruby on Rails. Since then I have immersed myself in RoR. I''ve done the tutorials, I''ve purchased the books. But, I could never get even a sample RoR app to work on netfirms. 500 server errors.
2006 Aug 16
5
Rails theory question, where to put a join query
The is something I wrestle with a bit when I construct joined queries.. Perhaps some experienced insight will straighten this out for me. Say you have two tables with two models, ''authors'' and ''posts''. an author has_many posts, a post has_one author. You need methods to do the following queries: find_author(postid) find_posts(authorid) And you are doing a
2006 Jun 08
3
has_many :through updates on delete.
I have a model that looks like this: class Actor < ActiveRecord::Base has_many :member_groups, :foreign_key => ''member_id'', :class_name => ''GroupMember'' has_many :groups, :through => :member_groups, :source => :group end class Group < Actor has_many :group_members, :foreign_key => ''group_id'',:dependent =>
2006 May 03
1
error_messages_for when saving within another model
Hi, I have this save routine: def customer_address_create customer_options @customer = Customer.find(params[:id]) @customer.addresses.create(params[:address]) @saved = @customer.save end That passes to a rjs template like this: if @saved page.visual_effect :Fold, ''add_address'' page.replace_html ''addresses'', :partial =>
2007 Oct 03
3
Why does error_messages_for take string as param?
Hi, I wonder why error_messages_for take strings as params instead of instance variables. error_messages_for ''user'' instead of error_messages_for @user ''user'' is translated into @user eventually. If so, who not take the instance variables directly? Is there any reason for that? Thanks in advance. Sam -- Posted via http://www.ruby-forum.com/.
2006 Jul 29
0
error_messages_for - Custom formating
Hi all, I am trying to change the default formatting for the error_messages_for. To quote from the ROR manual: /////////// error_messages_for(object_name, options = {}) Returns a string with a div containing all the error messages for the object located as an instance variable by the name of object_name. This div can be tailored by the following options: header_tag - Used for the header of
2006 Jun 07
0
problem with error_messages_for
Hi everyone, I have this weird problem where error_messages_for isn''t working. I have a model group which has to validates constraints.. --------------------------------- class Group < ActiveRecord::Base #directionality points to the user model #this table contains the foreign key belongs_to :user validates_uniqueness_of :name validates_presence_of :name end
2006 Jan 23
2
Problems with error_messages_for
I have a model Area which has_many Streets. The Area has a couple of attributes of its own but mostly I want to be able to add/delete/update Streets for a particular Area, but all on one page rather than having a separate view for editing a Street. I''ve managed to get a form displayed with a row for each Street already assigned to the Area by using form fields with
2003 Jul 31
1
Réf. : groupmember list fails with 3.0.0b3 and LDAP
Hi, Same problem for me, any clue ? Gana?l. owen@isrl.uiuc.edu@lists.samba.org on 07/31/2003 01:42:21 AM Envoy? par : samba-bounces+ganael.laplanche=edf.fr@lists.samba.org Pour : samba@lists.samba.org cc : Objet : [Samba] groupmember list fails with 3.0.0b3 and LDAP Hi all, I've been working on a PDC with group mapping with Samba-3.0.0Beta3 with OpenLDAP-2.1.22. Things
2006 Jun 20
2
Validation error_messages_for problem
I am having trouble getting error_messages_for to work. My controller(relevant parts) looks like def configure @account = session[:account] @user = User.new end def add_new_user_to_account @user = User.new(params[:user]) if @user.valid? session[:account].users << @user end redirect_to :action=> ''configure'' end end and my
2006 Nov 04
1
error_messages_for ''a''
hi all, i have two models in single form and i want to display error messages for both on submission when i do something like this i get an error <%= error_messages_for ''a'' %> <%= error_messages_for ''b'' %> can anyone tell me how can i do something like this thanks in advance regards gaurav -------------- next part -------------- An HTML
2006 Jul 17
0
error_message_on / error_messages_for
Hi, just a simple question between error_message_on / error_messages_for ... Well, if you use error_messages_for in your web page, there is no problem even if anObject==nil (for example , the first time you load your form) whereas error_message_on must be use with an instanciated object ... So, you always has to double check if anObject is not nil before using error_message_on ? I
2006 Jun 21
2
error_messages_for not displaying validation errors
Hi all, I''ve been searching the web and the list archives for help on this and I''ve found some tips, but I''ve been racking my brain on this for hours. I have a Model, View, and Controller that are handling the uploading of a file to my server. I want to make sure that the description is set and that a file is selected to be uploaded. I have set validates_presence_of
2006 Apr 11
0
Problem w/ error_messages_for: wrong number of arguments?
Hi guys, I just upgraded to the latest version of Rails 1.1 and am getting some odd error messages. Specifically, I have the line: <%= error_messages_for ''user'' %> at the top of one of my .rhtml files and of course a variable @user. When an error occurs when saving ''user'', instead of getting the error message (which happened fine in Rails 1.0), I now
2006 Jan 11
0
error_messages_for >> Cannot convert Array into String
Hi all I have the following Model: Member(id, username, first_name, last_name, hashed_password, password_salt) Now I want to allow users to register for an account using the following form: --- <%= form_tag %> <%= error_messages_for ''member'' %> <p><%= _(''Username'') %>: <%= text_field(''member'',
2006 Jul 17
2
error_messages_for ?
Hi, I can''t list error_messages in my Form ??, and all the formfields are reset ...(I think my redirect :back clean everything, formfield and error_messages ...), only my flash[:notice] is ok.... I would like to use the "error_messages_for" tag to add a simple red * on my textfiled if a problem occurs ... thanks for help arnaud here are the basics steps to check that
2006 Jun 13
7
help with ''error_messages_for''
Greetings, I''m in the throws of deploying an app on site5, and I''m getting strange errors. I think I might need to understand how error_messages_for works. I get a pretty standard looking error: " You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occured while evaluating nil.errors Extracted
2006 Feb 13
2
Overriding the error_messages_for method
If I wanted to override the error_messages_for method where within the rails structure would I put it? Which file? Thanks :-) John Kopanas http://www.kopanas.com ===================================================================== http://www.soen.info - source of the freshest software engineering information on the net http://cusec.soen.info - software engineering conference
2006 Nov 30
3
model stubs with view/controller specs: error_messages_for??
How would I set up a model stub so that <%= error_messages_for ''some_model'' %> doesn''t complain? I started going down this road: @some_model.stub! (:errors).and_return(ActiveRecord::Errors.new) but it seems like a long, hopefully uneccessary road. Cheers, Michael