Displaying 20 results from an estimated 20000 matches similar to: "field_with_errors not showing"
2010 Oct 01
8
field_with_errors.
If a model doesn''t pass validation the field in the view is put under
a <div class="field_with_errors">.
But who create that div? field_text helper do it?
--
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
2006 Jan 30
1
Either/Or Validation
How would I use validations to ensure I either received a blank value or
a ten digit number?
If I set validates_length_of :field, :in => 0..10 then that would allow
any value in-between. The allow_nil => true option does not seem to
work.
I''ve also tried using this with some combination of
validates_numericality_of but cannot get it to work.
Any help would be greatly
2006 Mar 21
3
Switch...err Capistrano hangs
I''m having a little bit of difficulty deploying my app. I''ve run the
setup and it works with Cap, but when I try to deploy it hangs at
"querying latest revision". I can access my svn locally (I''m on a
windows xp sp2 machine) using SubClipse plugin, but not through the
command line though (yes, svn client is installed).
I''m pretty sure that
2006 Jun 14
0
Changing the name of application.rb
Does anyone know how to change the name of the application.rb file in
app/controllers?
I''ve got a model that I would really like to use the name ''Application''
for, but it''s getting confused with this file. I would really like to
just be able to change the file in app/controllers so I can cleanly have
Application.find ... without having to name my model
2006 Feb 28
2
Escaping Arithmetic Symbols
Could someone please tell me how to escape the ''division'' arithmetic
symbol in a model or controller? I''ve searched around and cannot find a
solution.
I''ve got the following in my model:
def avg_risk
t = 0
self.audits.each{|key| t = t + key.control_rating }
t = t / self.audits.count #this line doesn''t work... I''ve even
2006 Mar 24
1
Caching and Capistrano
I had an incredibly difficult time getting this to work correctly and I
have a couple of comments/questions, after the fact.
When using caching and Capistrano together, how have you set the
permissions on your RAILS_ROOT/public folder...or have you sent your
cache data to your document root? I''ve got it working now, but of
course, it will break the next time I deploy.
I was
2006 Jan 19
4
DevLists :: Mailing lists made easy
I have tried various mail clients to read the Rails mailing list for the
past 12 months. As the list volume grew, it became utterly impossible to
browse through the new messages and very hard to locate the useful gems
I had previously found. After subscribing to a few more lists, I
realized that there had to be a better way. I could not find anything
to meet my needs, so I designed
2007 Apr 09
4
How do i switch off error wrapping for a specific field?
Hi, i have some issues with the default rails error wrapping. It wraps
errors in a div with class ''fieldsWithError'', which is not good practice
in my eyes. Adding a class ''error'' to the field would be much nicer.
My solution to the problem: build your own FormBuilder. Funny enough, i
found no (nice) possibility to switch error wrapping off while using the
2006 Apr 25
5
markaby or erb?
Guys,
We''re embarking on a new dev project, and I''m curious....why would one
choose markaby over erb? I for one am no fan of the erb syntax, but
aside from that it''s similar to other technologies I''ve used in the
past: PHP, JSP, ASP, etc.
Why would one choose markaby over erb? What are the benefits? What are
the drawbacks? Is there anything remarkable
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
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
Problem:
1. ERB and Builder template engines are heavily wired in ActionView::Base
2. Should be optional. If we use different engine - why load all their
stuff if not needed?
3. There are template engines which expect files in their own locations
and cache them in their own way. For instance a template engine may
store templates in a database. These engines don''t need any central
source
2006 Feb 07
0
redirect_to and complex values
Guys,
I have a number of actions that need to redirect to the user (as opposed
to render) to an action so that a refresh won''t report the data.
However, these actions also need to pass a hash to the targeted actions
in the redirect.
Trying to do this with redirect_to paramters converts the Hash to a
String, which won''t work for me. For example:
2006 Mar 24
3
Changing sidebar in layout per controller
I am currently using 2 layouts in my site. One is for the admin area. I
am trying to get content in my sidebar to change depending upon the
current controller.
Example:
Within admin I have a users controller and a articles controller. When
in the users view I want the sidebar to display options (like add user
delete user etc).
What is the best actionview way to do this. I don''t
2006 Jun 21
3
Show Exceptions in Production mode.
Does someone know what to set so that exceptions are shown (to user)
when in production mode? I would like the exception to show exactly as
it does in development mode.
I know that they are written to the log.
Richard
RogueWaveMarine.com
--
Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Feb 07
0
scope problems testing a helper method that calls link_to()
We''ve been having problems writing functional tests for helper methods
that rely on ActionView methods. Here''s a specific example.
In application_helper.rb I''ve got a method called ''party_link()ยจ:
def party_link(party)
link_to party.full_name, { :controller => ''contacts'',
:action =>
2008 Dec 18
2
Render a view from console
Hello!
In my application I''m trying to render a view from a class in /lib
folder. I have found that it''s very similar to render a view from
console. So, I have tried different methods:
>> string = ActionView::Base.new.render( :inline => ''works'', :layout => false )
=> "works"
>> string = ActionView::Base.new.render( :template =>
2010 Dec 01
0
Thinking sphinx + rails 3 issue in results set
Hi All,
I am using rails 3.0 and i installed sphinx and added the following to
gemfile gem ''thinking-sphinx'', ''2.0.0'', :require => ''thinking_sphinx''
My structure is like below:
==========================
Model:
=====
class User < ActiveRecord::Base
include ActionView::Helpers::UrlHelper
has_one :profile, :class_name =>
2008 Jan 19
0
[CruiseControl] RubyOnRails build 8671 failed
The build failed.
CHANGES
-------
Revision 8671 committed by bitsweat on 2008-01-19 03:45:24
Support aggregations in finder conditions. Closes #10572.
M /trunk/activerecord/test/cases/finder_test.rb
M /trunk/activerecord/CHANGELOG
M /trunk/activerecord/lib/active_record/aggregations.rb
M /trunk/activerecord/lib/active_record/base.rb
TEST FAILURES AND ERRORS
-----------------------
2006 May 15
1
Simple: How to use TextHelper in a controller
I''m having trouble succesfully getting access to the
ActionView::Helpers::TextHelper.strip_tags
method from one of my controllers.
If I try to call it directly using
ActionView::Helpers::TextHelper.strip_tags
I get
undefined method `strip_tags'' for ActionView::Helpers::TextHelper:Module
What is the preferred way to make ActionView helpers available to a
descendant of
2006 Mar 08
0
Re: Rails Digest, Vol 18, Issue 216
> Message: 3
> Date: 8 Mar 2006 22:31:16 -0000
> From: Mikkel Bruun <devlists-rubyonrails@devlists.com>
> Subject: Re: [Rails] Caching model metadata?
> To: rails@lists.rubyonrails.org
> Message-ID: <20060308223116.19964.qmail@devlists.com>
> Content-Type: text/plain; charset=utf-8
>
> active record should cache the data when running in production...it
>