Displaying 20 results from an estimated 300 matches similar to: "Re: RESOLVED: Overloading error_message_on method in ActiveRecordHelper"
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
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
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?
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
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
2008 Jan 08
3
Unbreak ActiveRecordHelper::form() when protect_from_forgery is used
Can I get some +1s for this tiny patch? It fixes
ActiveRecordHelper::form, which is broken by default in new
applications created with Rails 2.0.
http://dev.rubyonrails.org/ticket/10739
Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to
2006 Jul 17
0
Ruby-GetText-Package-1.7.0
Hi,
Ruby-GetText-Package-1.7.0 is now available.
Enjoy L10n!
Changes
-------
* Improve to support Ruby on Rails
* Localize ActionView::Helpers::DateHelper.distance_of_time_in_words.
* Localize ActionView::Helpers::ActiveRecordHelper.error_message_on.
* Add ActiveRecord::Base.untranslate, .untranslate_all to prevend to
translate columns.
* "ID" fields are ignored as
2008 Jul 19
0
[ wxruby-Bugs-21273 ] Segmantation fault in textctr.append_text
Bugs item #21273, was opened at 2008-07-19 17:51
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=21273&group_id=35
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Roman Zawada (zwadar)
Assigned to: Nobody (None)
Summary: Segmantation fault in textctr.append_text
Initial Comment:
I''m using window with one
2006 Apr 15
0
Ticket #4140? observe_field issue.
Take these two basic bits of HTML.
<input id="user_email" name="user[email]" size="30" type="text" value="" />
<script type="text/javascript">
//<![CDATA[
new Form.Element.EventObserver(''user_email'', function(element, value)
{new Ajax.Request(''/account/validate_user_email/0'',
2007 Jan 22
0
[ wxruby-Bugs-8068 ] TextCtrl#append_text doesn''t work when text is in UTF8
Bugs item #8068, was opened at 2007-01-22 20:27
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=8068&group_id=35
Category: Incorrect behavior
Group: current
Status: Open
Resolution: None
Priority: 4
Submitted By: Alex Fenton (brokentoy)
Assigned to: Alex Fenton (brokentoy)
Summary: TextCtrl#append_text doesn''t work when text is in UTF8
2008 Dec 11
1
help needed regaring Acts As Taggable On Steroids
Hello,
In my rails application, I have a book model.
I want to add tags. For that I have installed
acts_as_taggable_on_steroids from this link
http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
and do as the readme file.
This is my Model :
class Book < ActiveRecord::Base
acts_as_taggable
end
Here is my ApplicationHelper :
module
2009 Jul 07
10
link_to, how do you combine url options and html_options?
I have a link-to that I wish to look somewhat like this:
link_to "link here", new_object_path,
:method => :post, :confirm => ''Press OK'', #url
options
:class => "css_class", :id => "css_id" #html
options
In any case I can either get the url_for options to work or the html
options to work, but
2006 Dec 17
12
Best practices for conditional display in views?
Hi.
I am writing an application that has a lot of boolean conditional
display logic, like this:
<% if user.description then %>
<p class="css_class"><%= user.description %></p>
<% end %>
Often the displayed content is more complex than the above, and to clean
up my views I am trying to pull a lot of this sort of thing into
partials.
However, the problem
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and
''acts_as_taggable_on_steroids'' and all of them output "undefined
method ''empty?''" with the tag_cloud action.
I am following the guides precisely. Yet I can find no references to
this error anywhere, so I must be doing something wrong...
I am on
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",
2006 Aug 02
1
Object is populated but attributes are unavailable
Will someone please tell me why this code...
--------------------------------------------
def test
org = Organization.find(1)
write_log("Org: #{org.inspect}")
write_log("Org name: #{org.org_name}")
end
----------------------------------------------
...is returning the blank org_name below?
Am I accessing the object''s attribute wrong?
2007 Jun 17
2
Wx::TextCtrl and wxMSW
Hey Alex,
Found a solution to the problem that was occuring with wxMSW and the
Wx::TextCtrl, have yet to verify that this will work in linux, but my little
trick to the matter, was simple, thanks to the things that are provided with
both Wx::TextCtrl, and Wx::Window classes.
I''m providing this bit of information for thoes who may have trouble with
dealing with Wx::TextCtrl, _AND_ have
2005 Nov 09
0
dropping element and pop-up from overlib
Hi everyone. I hava situation that i have drag and drop on my site, and I wonder is it possible to connect this to very good pop-up javascript library, i mean: at the moment when I drag element over the dropping area that area is highlited (using hoverclass: Css_class) but i want to add pop-up effect on the droppable area. Does anyone know how to do it?
It must work like this:
When the dragged