Displaying 20 results from an estimated 400 matches similar to: "Nested model + error message"
2009 Nov 26
9
ActionView::TemplateError (can't convert ActiveRecord::Error into String)
I cannot work out why this error is appearing.
ActionView::TemplateError (can''t convert ActiveRecord::Error into
String) on line #3 of app/views/button/_show_enquiry.html.erb:
1: <h1>Send us a message</h1>
2: <% remote_form_for :enquiry, :url => {:action => ''send_mail''} do |
f| %>
3: <%= error_messages_for ''enquiry'',
2007 Jan 03
2
error_message_on broken?
Hi,
in my app, using the error_message_on form helper like this:
<label for="user_name">User name:</label>
<%= error_message_on ''user'', :name %>
<%= f.text_field :name %>
generates the following error:
undefined method `errors'' for :user:Symbol
I am using edge revision 5813 and the simply_helpful plugin. Is there a
way to fix this?
2005 Dec 23
1
Overloading error_message_on method in ActiveRecordHelper
Hello all
I would like to overload the error_message_on method in the
ActiveRecordHelper module in order to emit a span tag instead of a div
tag. I try to achieve this by way of plugins: Under vendor/plugins
I''ve made a error_messages_on_fix directory, containing init.rb like
this:
---
require ''active_record_helper_fix''
---
..and a lib directory with
2009 Apr 21
3
attachment_fu giving problem on production
Hello friends,
I have configured attachment_f. It''s working fine on Local(development)
system but giving problem on production. Basically on production the
attachment_fu is not able to generate thumbnail image it saving the original
size image. Below is the configuration.
has_attachment :content_type => :image,
:storage => :file_system,
:max_size
2009 Aug 24
1
Authlogic Forgot Password
Hi,
Has anyone implemented the Authlogic forgot password stuff?
Please let us know how to, if anyone has or has the code for it.
Thanks,
Pratik
2010 Nov 26
2
cucumber
Hello How do i test the tiny_mce using cucumber + capybara.
Thanks for any help.
abhis
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2008 Oct 06
8
.htaccess rewrite
can someone help me with an .htaccess rewrite?
i''m trying to convert all requests to "/?spot=8888" to be "/locations/
888".
thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2010 Apr 30
1
render_to_string problem
i have a scenario where a jquery is receiving a response in the string and
which content html component like "<div id=\"test\">test</div>" ideally in a
view it should display only "test" but it displaying entire string <div
id="test">test</div> is there any way i am deal with the problem through js
or rails?
Thanks
abhis
--
You
2005 Dec 27
0
Re: RESOLVED: Overloading error_message_on method in ActiveRecordHelper
Leaving the body of the method the same as the default still throws
the "stack level too deep" error. As a matter of fact, it only
disappears if I comment out the ''require'' in line 1.
As it turned out, it was the method definiton itself that caused
problems. Ruby doesn''t have keyword arguments, but I tried calling the
method as if it had. But when I changed
2005 Sep 25
2
Problem issue with belongs_tohas_one and error_message_on
Hello
I have a problem with relationship with belongs_to - has_one and with
error_message_on
I have splitted one huge table users into two tables user and profile.
In users I''m keeping main fields like id,email,password and in profile there are
the rest of fields.
Table users:
id,email,password
Table profiles:
id,user_id,publicname, and more ...
My models are:
- user.rb
has_one
2006 Sep 14
0
Work around for problems with error_message_on
Hey all
I was encountering problems with error_message_on in the fact that it
caused an exception when no object by that name had any errors (or did
not exsist) so i created this work around...
def display_error(obj, method, prepend_text = "", append_text = "",
css_class = "form_error")
object = instance_variable_get("@#{obj}")
if object
2006 Aug 02
3
Disabling Error Divs
I am trying to figure out how to disable the error field thing in rails,
the thing that wraps errous fields with a div (class fieldWithError).
Any help on this would be great!
-Ray
--
Posted via http://www.ruby-forum.com/.
2008 Feb 27
8
ActiveRecord validation messages not I18N-friendly and enforces grammar
ActiveRecord validation messages are currently not I18N-friendly.
Specifically, I''m referring to the fact that it enforces a certain
grammar, namely the beginning of the message must consist of the field
name. For example:
validates_presence_of :name, :message => "can''t be blank."
...generates the message "Name can''t be blank". This grammar
2006 Apr 04
2
how to perform client side validations in RoR?
Hi,
I have a form for user registration. In that form there are fields for
password & confirm_password. Now in my database there is column
corresponding to password field. Now at clicnt side I want to validate
equality of password & confirm_password field. How to do that?
I have downloaded one password validator plugin & tried to used it. But
it requirs two seperate fields in
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
I have a select_tag in my view that uses options_for_select with
multiple = true. I am having trouble figuring out the Rails way to
create and update that field. Please help.
Models:
-------------
Service has_many AccessControl
AccessControl belongs_to Service
application.rb
-------------------------
$types = Array["Athens", "htpasswd", "IP", "None",
2009 Nov 27
1
Cucumber + Paperclip
Hello Friends,
First time I am writing a scenario for uploading images. But some how
things are not working as it should be
The cucumber scenario is
And I attach the file at "/home/user/Desktop/sdasd.png" to "avatar"
And I press "Upload Logo"
But I trace it. its showing up
avatar_file_name: "sdasd.png", avatar_content_type:* "text/plain",*
2006 Oct 09
4
error message on the redirected page
def edit
@product = Product.find(params[:id])
end
def update
@product = Product.find(params[:id])
if @product.update_attributes(params[:product])
flash[:notice] = ''Product was successfully updated.''
redirect_to :action => ''show'', :id => @product
else
render :action => ''edit''
end
end
when errors happen, to avoid
2006 Jul 21
1
validates_acceptance_of weirdness
On my registration form I have a checkbox for a waiver. In the model I
have the statement:
validates_acceptance_of :waiver, :on => :create, :message => "must be
accepted"
In the view:
<%= check_box_tag("waiver") %>
<%= error_message_on "user", "waiver", "Waiver "%>
For some reason validate is accepting everything when the
2006 Jan 04
1
[SOLVED] Am I going too far or Rails is just confusing?
On 1/4/06, John Indra <ji.milist@gmail.com> wrote:
> However, it doesn''t work for me. Following your article, I change my
I have found the source of the problem. I follow the solution provided by
http://blog.teksol.info/articles/2006/01/03/belongs_to-user-interface-take-ii
It''s a nice solution, however it contains typo :)
There is indeed no error_messages_on method,
2007 May 24
1
How do I show the selected values in options_for_select? Not as simple as it sounds.
How do I show the selected values in options_for_select? I have a
Service model and a AccessControl model. When a user edits a Service I
want the services access_controls to be pre-selected.
Models:
Service has_many AccessControls
AccessControl belongs_to Service
application.rb:
$types = Array["Athens", "htpasswd", "IP", "None", "Other",