Displaying 20 results from an estimated 30000 matches similar to: "Commenting out Code"
2006 Jul 12
5
validates_peresence_of
Is there an expert validater that can point me in the right direction?
I''ve looked for extended documentation on ''validates_presence_of'' but i
can''t seem to find any.
I''m trying to make sure that i don''t enter a nil object in my database,
so i''ve added validate_presence_of to my Record Model.
i.e. -->
class Record <
2006 Jul 17
2
actionmailer / @recipeints
Hi all,
i''m trying to email multiple people based on certain criteria.
i do a search like
@stacks = Group.find(:all, :conditions => ["component_id = ?", 2])
this populates stack to contain multiple groups with component_id =2.
How do i populate @recipients to contain all possible @stack.email.
Let me clearify. Each stack has its own email, and i need to include
each
2006 Jun 07
4
Setting default timezone ENV[''TZ'']=''UTC'' not working on windows?
Hi,
I''ve been trying to do timezone conversion, and have some trouble
getting it to work on my Windows machine. Searching the web, I found
http://wiki.rubyonrails.com/rails/pages/HowtoSetDefaultTimeZone
...which explains how to set the default timezone. I''m using an
environment.rb that include the lines:
ActiveRecord::Base.default_timezone = :utc
ENV[''TZ''] =
2006 Apr 24
2
Session Restore Problem
Hi everyone,
If I save some object in session and then restart the server, I get
the following error unless I restart my web browser (or delete
session files):
Session contains objects whose class definition isn''t available.
Remember to require the classes for all objects kept in the session.
(Original exception: uninitialized constant TZInfo [NameError])
I know what the problem
2005 Oct 19
1
TZInfo::Timezone problem selected value
hey, i have a record in the database gtm_zone with value ''Europe/London''
i want to have a select box with all the zones and the corrected selected
@firm.gmt_zone = Europe/London
TimeZone from ruby (trying to expand with TZinfo)
dont want to select Europe/London, and not sorted
<select id="firm_gmt_zone" name="firm[gmt_zone]">
<%=
2006 May 19
1
flickr like DST timezone management
Hello everyone
I wonder if anyone can point me to the library for timezone management
with DST support, which has timezones, like flickr has. I know that
there is TZInfo, but it''s a bit different for it has huge list of
available timezones in ''Continent/City'' format. I would like my
application to have timezones list more like on flickr (or windows
regional settings) -
2006 Jan 04
2
Using gems from vendor/ ?
Maybe someone here can help me out. I''ve unpacked tzinfo in to my
vendor/ directory using "gem unpack tzinfo" and got a
vendor/tzinfo-0.1.1 directory as a result. How can I require this gem in
my app? I''m trying to use a require line in my environment.rb but no
matter what I do Rails seems to look for a locally installed copy in
/usr/local/ instead. Any advice?
2006 May 10
3
has_many association.
I''m creating a address book.
A user can have many contacts.
In the user model, I put:
has_many :contacts
And in the contact model, I put:
belongs_to :user
To list all contacts, I search as following:
@user = User.find(session[:user_id])
And rendering:
<%= render(:partial => "contact", :collection => @user.contacts)%>
To persist I am using the following
2006 Aug 01
2
Date length in english plugin/built in?
Is there a plugin or built in function for converting a date interval
into the English equivalent? For example, "So and so posted this 45
minutes ago".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060801/e33b04d1/attachment.html
2006 Jun 01
3
html_options and select()
I am trying to add html_options to select():
<%=select(:user, :id,[[''me'',1],[''myself'',2],[''and I'',3]], :select =>
{},:html_options => {"size" => 5, "multiple" => true})%>
This does not work... How do I get the html_options to work?
ActionView::Helpers::FormOptionsHelper
--
Posted via
2006 Apr 27
3
XML output
Hi,
Sorry abt the half finished post that I sent out earlier.
The idea is to generate an output xml response as such:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<response status=''NOT_AVAILABLE''>
<message>Some text</message>
<from>Me</from>
</response>
I make a request like such
2006 Jun 18
2
Hosting timezone differs of clients timezone
Hi,
I have a website in production wich uses a lot of date and time
calculations to show specific information.
The timezone of my hosting service (Dreamhost) is PDT, and the timezone
of my potential clients is CEST. There are 9 hours of difference between
them.
Is there an environment variable that I could adjust in my rails
application, so all date/time values be set to CEST timezone?
Thanks.
2006 Apr 24
7
Controller can''t find helper?????!!!!!????
I have a controller named xyzController under app/controllers
I have a helper class named xyzHelper under app/helpers.
Shouldn''t I be able to call methods from xyzHelper inside of
xyzController without any problems?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2006 Apr 27
2
check_box_tag and :disabled => ''disabled'' problem
I''ve been using the check_box_tag to generate checkboxes for an application
I am working on and I''ve run into a little hiccup.
When I set the options for the checkbox to be { :disabled => "disabled" }
the checkbox becomes disabled, as I would expect. However, if I set the
checked value to true and keep the disabled option, the value for the
checkbox is not returned.
2006 Sep 07
3
pairwise.t.test vs. t. test
Hi,
If I set the p.adjust="none", does it meant that the output p values from the pairwise.t.test will be the same as those from individual t.tests (set var.equal=T, alternative="t")?
I actually got different p values from the two tests. See below. Is it supposed to be this way?
Thanks
Johnny
> x
[1] 61.6 52.7 61.3 65.2 62.8 63.7 64.8 58.7 44.9 57.0 64.3 55.1 50.0 41.0
2006 Apr 11
5
Reading MySQL rows
Hi there,
I?m having difficulties reading the content of some rows in my database.
Tried to use some of the code at page 221 in the pickaxe, but didn?t
make it work.
The SQL query works fine directly against the database.
mysql> select id, count, company from users where name = "martin";
+----+-------+------------+
| id | count | company |
+----+-------+------------+
| 1 |
2006 May 09
2
User.new doesn´t capture all of the parameters
Hi,
I have a page where I can add new users to the database, but it only
sees whats in the name and passord field.
add_user.rhtml:
<%= form_tag %>
<%= form_tag :action => ''add_user'' %>
<td>User name:</td>
<td><%= text_field("user", "name") %></td>
</tr>
<tr>
<td>Password:</td>
2006 Jul 30
2
Can''t submit tickets to dev.rubyonrails.org
I get an "internal error" and this traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
314, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
199, in dispatch
resp = chosen_handler.process_request(req)
File
2006 Jun 18
2
convert timespan to verbose description
Hi,
I always see RoR pages showing the elapsed time like that
''Published 3 days, 23 hour and 5 minutes ago''
''Published less than 3 minutes ago''
I guess this conversion can be done using a Rails function, however I
can''t find it.
Does somebody know its name??
Thanks a lot
Peter
2006 Jan 28
2
javascripts
Trying to use auto_complete_for which works fine on my home system.
I see that when I use <%= javascript_include_tag "defaults" %>
that when used, the webrick reports
GET /javascripts/prototype.js
GET /javascripts/dragdrop.js
GET /javascripts/effects.js
GET /javascripts/controls.js
but on the system that I am trying to develop on and doing similarly,
the webrick only reports