If you want to go onto the animated gif direction, i believe the only option
you have is to look at ImageMagick and RMagick, but this is not trivial stuff.
On the other side, Javascript and modern browsers (like Safari and FireFox) can
help you with something like :
a=0;
setInterval(function(){
Have you tried
> pop = Net::POP3.new 'pop.gmail.com'
Christophe
Le 19 avr. 2010 à 12:48, Shreyas Satish a écrit :
>
>
> I need to retrieve emails from my Gmail account using Ruby on Rails. I'm
> currently using this piece of code, but it gives me a timeout error
> everytime.
>
> require 'net/
You should investigate collection_select
http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#M001625
Hope this helps,
Christophe
Le 15 avr. 2010 à 05:56, Kris Mojica a écrit :
> a stupid question from a newbie..
>
> how can i populate my select_tag with the values from a
If I may jump in, I'm interested in understanding why you would do this kind of
database job with Ruby vs. an extra SQL query.
I had the feeling that it would be wiser (and would execute faster) to delegate
the job to the database engine
But I'm kind of amateur.
Thanks to anyone who is willing
Thanks a million !!!
You saved my day
Although I really don't understand what this little command does and why it's
there.
Anyway, even if I heard that I shouldn't use RMagick, I can go on my project.
Christophe
Le 13 avr. 2010 à 17:53, Andy Jeffries a écrit :
> In the ruby console, this
First, pardon me if this is not the right forum.
I'm banging my head on the wall for a day now with a RMagick installation issue.
I installed ImageMagick and RMagick both from source. They compiled with
problems. (I had some issues with fonts, but that's over)
In the ruby console, this works :
I'm just a rails amateur, but I've been dealing with Prototype stuff a bit
longer and I bumped into this image preloading stuff already.
I don't clearing understand what you want to do while your images are
preloading and also what you want to do once they are preloaded and this is
pretty crucial a
Thanks to anyone who replied.
You gave me pretty good explanations
Now I better understand why I'll always be an amateur (and be delighted to).
Le 8 avr. 2010 à 18:17, Frederick Cheung a écrit :
>
>
> On Apr 8, 4:08 pm, Christophe Decaux
> wrote:
>> Hi there,
>>
Hi there,
I've been investigating the railscasts episodes which talk about complex forms
and I ran across this notation in the example code provided in part 3 of the
episode.
at some point in a model method, there is this line:
tasks.reject(&:new_record?).each do |task|
I have no problem wit
I'm still new to Rails so pardon me if I misunderstand your issue, but I
believe the answer is to use
1) collection_select
2) :onchange
You'll probably find your way here :
http://pullmonkey.com/2008/03/30/dynamic-select-boxes-ruby-on-rails/
Christophe
Le 8 avr. 2010 à 11:00, Veena Jose a éc
The only hack I can think about would be to have your own monitor with some
dirty javascript based on a setInterval and compare the innerHTML of the div
with a previous state.
But Robert's answer is much safer.
2010/4/8 Robert Walker
> Loganathan Ganesan wrote:
> > But my need is to monitor the
Thanks a lot.
I had some difficulties to find info about iconv, but it works.
Christophe
Le 2 avr. 2010 à 19:07, Frederick Cheung
a écrit :
On Apr 2, 4:23 pm, Christophe Decaux
wrote:
By the way, I cannot ask the request sender to change his encoding
method...
On the other hand
First, I wouldn't use the periodically_call inside the refresh div. I
have the feeling that it will vanish at the first call as it will be
replaced by the content if the update.
Anyway, if you want to redirect the user to another page, you cannot
use redirect because the periodical just repla
I'm not a professional Rails developper but I believe I went through the same
kind of issue.
So take a look at this:
http://railscasts.com/episodes/75-complex-forms-part-1 and possibly part-2 and
3 as well.
Christophe
Le 6 avr. 2010 à 08:01, ct9a a écrit :
> hi guys,
>
> I have a fairly simp
Hi there,
I have an issue with character encoding on http request that I need to handle
in my rails apps.
Here's an example of my log :
Processing MessagesController#incoming (for 217.117.146.164 at 2010-04-02
16:08:27) [GET]
Parameters: {"action"=>"incoming", "z"=>"Je suis un bon ?l?ve.",
"a
I agree with Victor, it's a very good book.
But perhaps you can start with a very good starting book that I bought before
the mentioned book.
It's Head First Rails.
It has a very interesting learning concept which cleared a lot of web concept
to me
Good luck
Le 1 avr. 2010 à 16:44, Victor S a
This is normal behavior
With the ruby script/server command you actually started a web server process.
Now that process is holding your console (the Windows 7 cmd)
So you should start a new console and you can type all others commands. In the
first console, you can watch the result of the server o
Actually, I believe this is even simpler than you think.
Why don't you have a process which is:
People enter the ticket number
After validation they are directed to the download page.
You don't need to check if the ticket is in the database, you add it anyway.
Later, you'll be able to list the t
Why did you altered Jeffrey's code.
He gave you a good advice
In the "Agile Web Development with Rails" you can find this: Rails doesn't
parse the SQL inside a condition and so doesn't substitute the #{name}
According to the same book, you should always use the ["title = ?", name]
notation as o
I'm kind of a newbie, so I don't understand all the power of routes and
implicit render that can be found in scaffolding
I have an application that have several views which are quite different but
based on the controller action.
What I would like is to be able to define routes that would go th
Hi there,
I have an issue with Sortables that I can't figure out. I'm not sure if this
issue is related to Sortables or if it is a more generic Javascript/Rails
interaction issue
Let's say I have a sortable with a list of items, but the top 3 elements have
special meaning.
What I'd like to acc
I'm sorry I only have a French link to give you. But it's a pretty
good one which saved my life last week. I'm sure you can translate it
with google.
http://www.mickael-allain.fr/index.php?post/2009/05/16/Installation-d-un-environnement-de-développement-Ruby-On-Rails-sous-Ubuntu-8.10-/-9.0
4
Thanks,
I'm so stupid...
Can't understand how I missed that
Christophe
Le 26 mars 2010 à 16:01, Hassan Schroeder a écrit :
> On Fri, Mar 26, 2010 at 7:44 AM, Christophe Decaux
> wrote:
>
>> and a small view to acknowledge incoming message
>> incoming.h
Hi there,
I'm kind of a newbie, so pardon me if this is obvious
I'm developing an app that has to accept creation of records from http requests
such as
http://my.domain.com/in/?text=some+t...@alias=myname
So I have this route :
map.connect '/in', action: 'incoming'
and this action in the contr
Thanks Leonardo,
I installed everything with gem
Anyone else ?
Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit :
> On Wed, Mar 24, 2010 at 9:08 AM, Christophe Decaux
> wrote:
>> Hi there,
>>
>> I'm trying to install passenger on a hosted server which has
>>
Hi there,
I'm trying to install passenger on a hosted server which has
Ubuntu 9.04
Ruby 1.8.6
Rails 2.3.5
Apache 2
I had some trouble with gem install passenger, but went through after
installing build-essential which were not on the machine.
First when I launched passenger-install-apache2-module
Hi there,
I'm not a longtime Rails developper so pardon me if misunderstood your pb.
But IMHO, I believe you're looking for a solution to enable multiple records
creation through one form.
Why don't you have a look at this short video:
http://railscasts.com/episodes/73-complex-forms-part-1
and pr
What you are facing is the classic image loading issue.
I think the following code should help you, I found it sometime ago it is based
on this page : http://www.webreference.com/programming/javascript/gr/column3/
Basically, you need to have
- an array with url's for your big images such
I don't know much about haml, but I wanted the same thing than you. Here's what
I did
<% form_remote_tag( :url=>{:action=>'moderate', :controller=>'messages'},
:html=>{:id=>'new_message_form'},
You probably should have a look into :
http://railscasts.com/episodes/73-complex-forms-part-1
Christophe
Le 10 mars 2010 à 23:13, Dudebot a écrit :
> Does anyone know how I can repeat fields for a model (that would
> insert into different records) in a form? E.g.
>
> <% form_for @thing, do |f
I believe you have the solution in the previous answer.
When you do this division:
> @average_stat.points = stats.sum('points') / stats.count('points')
you divide two integers and ruby gives you an integer. That's the way it is.
so instead do this division : (as Robert suggested)
@average_stat.p
es a écrit :
> On 9 March 2010 13:30, Christophe Decaux wrote:
> Thanks,
> That's a good start.
>
> Any advice where to start looking for how to make a helper method ?
>
> I'd recommend Agile Web Development with Rails (Pragmatic Programmers book).
> I looked on
Thanks,
That's a good start.
Any advice where to start looking for how to make a helper method ?
> I'm kind of a newbie on RoR and on this group and I was wondering if
> someone could help to clean this bit of code:
>
> How about something as simple as:
>
> <% for image_filename in ["hide.png",
33 matches
Mail list logo