Displaying 20 results from an estimated 1000 matches similar to: "How do I get today''s date?"
2006 Jun 01
7
Active Record Basics - Making it commentable
hi everyone, I hope someone can help me out with some active record
basics? I''ve been banging my head for the past 4 hours and I can''t seem
to get it to work.
I am trying to add comments to a caption (just like how one adds a
comment to a post in a blog). I seem to be able to read posts just fine
from the DB, however, I can''t use the "recordComment"
2006 Jun 01
8
[Pdf::Witer]
Is anyone using Pdf::Writer?
I don know how to insert html tags in a pdf using Pdf::Writer, except <b>
and <i>
I think an idea is with Pdf::TechBook but i hadn''t seen any example till
now.
--
Cheers,
ioana k&a
http://boulangerie.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 09
8
[how can i delete a file system..please help]
Hi,
I''m trying to delete a file system (<xml_26548975.xml>)
File.delete("xml_26548975.xml")
But I get this error:
"Permission denied - ./script/../config/../uploads/xml_26548975.xml".
Why?
--
Cheers,
ioana k&a
http://boulangerie.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 May 17
5
Today is "Rails Hates Me Day"
Has anybody had Rails just refuse to cooperate with anything?
I had an application working great in development mode, then switched it
over to production, tried to host it, but couldn''t. Some error that I
can''t figure out. So I decided to create a simpler application, host
THAT in little baby steps until something went wrong so I could tell
maybe where I was losing it.
2006 May 12
8
switching from development to production?
I think I''m missing a step here, but they don''t seem to cover this in
the AWDWR book... does anybody know the various steps required to switch
from development to production mode in Rails? I''ve scoured the
application and changed everything that stands out, but the damn thing
is still running off the development database and won''t connect to the
production
2006 Jun 08
3
Back again; errors in depot app
Sorry, but this is a big one - after adding the Ajax portion of the Agile
Web Development tutorial my page displays:
Application error
Change this error message for exceptions thrown outside of an action (like
in Dispatcher setups or broken Ruby code) in public/500.html
It started when I added -
page[:current_item].visual_effect :highlight,
:startcolor => "#88ff88" ,
:endcolor =>
2006 Apr 06
2
making an integer from a float
Does anybody know how to turn a floating-point number (i.e. 60.345) into
an integer by cutting off or rounding the decimal portion? Either
method, or both, would be quite welcome. Thanks! This forum rocks!
--
Posted via http://www.ruby-forum.com/.
2006 Jun 08
5
Field names in validators
Hi!
Is there a (simple) way to use alternative field names in validation
messages? For example, if I have a validator like this one:
validates_presence_of :email
how can I make it print a message like "E-Mail Address can''t be blank"
instead of "Email can''t be blank"? I can override the "can''t be blank"
part by using the :message
2006 Jul 05
2
splitting a paragraph into words and spaces
I''m using this:
<% words = article.content.split(/ /) %>
<%= words[0..20] %>
to (ostensibly) split a paragraph into component words, with spaces in
between, then print to html only the first 20 items, words and spaces. I
got this (split(/ /)) from the online pickaxe book at
http://rubycentral.com/book/ref_c_string.html#String.split . The problem
is, the resulting array
2006 Jul 05
3
splitting a story with double-spaced para''s
Quick question - if i want to separate a long string of text, separated
by single carriage returns, into an array of paragraphs, I can use the
following code:
paragraphs = article.content.split("\n")
The "\n" means a carriage return, as far as I can tell.
If I wanted to take text, that had been written using the more common
double carriage returns, into an array of
2006 Apr 03
15
How should I pick a random entry from the database?
Hi guys. Total newbie here. I''ve been doing web stuff since 1996 but
only began the foray into scripting last year. I haven''t got my skull
completely 360 degrees around OOP yet. It''s just me here (in Japan) and
there are no Ruby groups in my area (never mind any in English).
I''ve got a database table - real simple: question, answer, and id fields
- and I
2006 Jul 04
4
ROaR: A Ruby on Rails Podcast
I''m starting a new podcast to cover some of the hot topics going on in
Rails. Half news, half interactive, all community. As always, the
first episode kinda sucks but I''m looking forward to feedback from all
of you on how to make it better.
http://www.simiancodex.com/roar/
or for iTunes people
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=163609703
Michael
2006 Jun 07
2
[delete an uploaded file issue]
Hi,
I''m trying to delete an uploaded file (<xml_26548975.xml>). But I get this
error:
"Permission denied - ./script/../config/../uploads/xml_26548975.xml".
Do I need to set some configurations for WeBrick?
--
Cheers,
ioana k&a
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 06
8
How do I wrap a <%= link to %> around an image?
I''ve got a bunch of dynamically generated link paths that I want to use
to link some dynamically-generated image paths. Specifically, I want to
link thumbnails in a gallery to the larger images.
But I''m stymied by Rails'' syntax. I can''t figure out how to do this.
I tried this:
<%= link_to(image_tag("../../images/photos/photo.photogroup/TN_
2006 Jun 22
2
Passing a value from one rhtml to another
I''m trying to find a way to get from one rhtml page to another and
taking a value along to use in the second page. Basically a user clicks
on one of many download links and what should appear on the next page is
all the available stuff related to that download, so I think if I take
the id number of the first page then i can use if statements in the
second page? Sorry if that sounds
2006 May 31
3
class does not inherit (?) ActionRecord::Base
Hi. I''m a newbie at this, so please bear with me.
I have several classes which model several corresponding tables. All of
them seem to work except one. I have not made many modifications from
the scaffold templates. However, with one class, Log, all methods give
me the following type of error
NoMethodError in LogController#create
undefined method `save'' for
2006 Mar 30
7
text_area
How to make that the typed code on ruby in text_area it was carried out
in @params ["name"]??
--
Posted via http://www.ruby-forum.com/.
2006 Jun 02
5
ActiveRecord: Getting table names
How do i get (discover) all the table names within a database using
ROR/ActiveRecord ?
I wish to build a webapp that connects to a database on the fly,
discovers tables and column names etc and then can show data or build a
report based on user selection. The ActiveRecord API doesnt seem to give
any method for getting table names.
--
Posted via http://www.ruby-forum.com/.
2006 Jun 02
3
Wierdness with rake test_units and schema.rb
I have just migrated to use Rail 1.1 from 1.0.
In the progress of fixing and cleaning up the unit tests. I found the
following problem. I am not sure if this is a bug or it is my
environment.
When I run "rake test_units, some of the index in association tables is
not created, this leads to failures for some unit test cases.
Thinking that may be because I didn''t setup the
2006 Apr 07
22
Find WHERE in Rails
I''d like to find all records that have a certain integer as their
"level" field in the database. I know how to find all the records:
allquestions = Question.find(:all)
...and I know how to find the one record that has a certain id:
allquestions = Question.find(params[:id])
...but how do you find all the records that share a certain value in one
of their fields? I tried