Ix Quic | 17 May 16:34
Picon

How to freeze to 2.1.0-RC1?


What TAG or REVISION number do I use to rake rails:freeze:edge to 
2.1.0-RC1? I've tried TAG=rel_2-1-0-RC1 and TAG=rel_2-0-991, but without 
success.

(I'm on shared hosting, so I can't just gem install rails easily.)

Also, when I freeze without a parameter (= bleeding edge if I understand 
correctly) and specify RAILS_GEM_VERSION='2.0.991' in environment.rb, it 
seems to recognize the 2.1.0 features, but "rails -v" and "ruby 
script/about" still say "Rails version 2.0.2". Is that normal?

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Xdmx Xdmx | 17 May 16:04

attachment_fu, how would you test this?


Hi, i'm starting to go nuts because of this. i'm playing with
attachment_fu, everything is ok, but i also want to put everything under
test too. Actually i've a post, where you can upload images, and it
works. But now i want to set that it's mandatory to upload at least 1
image.
The code it's quite simple and stupid:

errors.add(:image, 'at least one') if post.images.size.zero?

...and obviously it works...

...but how would you test this by unit tests?
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

GA Gorter | 17 May 15:34

File.new variable with extension


I ned to create a file of the name of a variable?
but i can't create an extension.

File.new((@page.title), 'w' ) {|file| file.write( 'testfile' )}

how can i maka a extension like this

File.new((@page.title.txt), 'w' ) {|file| file.write( 'testfile' )}
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Jaume Arús | 17 May 15:05
Picon

Ruby 1.9 on Rails 2.x?


¿What about ruby 1.9 and rails 2.x? ¿Does some one know if there is a
migration plan on works?

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

sai | 17 May 08:53
Picon

How to give name to text_files dynamically


Hello

I am new to rubyonrais..

I want to display data in table with textfields from database, so
that
i can edit all the values at a time, I mean all rows data.then i have
to save all rows at at time.

How to do this in rails..
Urgen please

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Pål Bergström | 17 May 13:18

Select and how to read the api


I'm trying to understand how to use the select, especially how to make
an option selected. I want to add the values manually, but be sure one
value is selected when finding an existing post in the db.

How are you supposed to understand how to do that from this?

http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#M000940

This is what I've used until now:

<%= select 'user', 'age',
['','10-20','20-30','30-40','40-50','50-60','60-70','70+']  %>
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Mr. Bless | 17 May 12:52
Picon

Simple Captcha


Hi! Guys I am using simple_captcha for login system. But I have no
idea about making the captcha  refreshable. As I am new to RoR. Please
help me.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Frantisek Psotka | 17 May 12:18

two database migration (active record)


Hello.

I want to write script, that will migrate one database (with models) to
another database (with another models) using ActiveRecord and all of its
benefits. It is possible? Please give me any tips.

I am moving database form old app to new one. It would be great to use
ActiveRecord for this complex task.

Thank you.

rndrfero
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

goodwill | 17 May 04:46
Picon

Generator simple question: How to specify parameter?


I wonder if I have did something fishy here (probably I did...)
when I type:

script/generate scaffold model --skip_migration

It saids:
invalid option: --skip_migration

Perhaps some syntax I don't know on how to specify parameters for a
generator?
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

histrionics | 17 May 01:13
Picon

Timeout not obeyed when trying to open bad url


Here is something Ive never seen before:

I have a list of urls fed into mechanize (which uses net/http to grab
pages)

I have it setup as thus:
require 'mechanize'
  agent = WWW::Mechanize.new;
  error_count = 0
  begin
    Timeout::timeout(2) {
      @tracked_page = agent.get("http://#{site_url}")
    }
  rescue Timeout::Error => timeout_error
    puts "I TIMED OUT AFTER 2 SECS BUT IM TRYING AGAIN:
#{timeout_error}"
    error_count += 1
    if error_count < 5
      puts "ATTEMPT NUMBER #{@error_count} QUITTING AFTER 4 TRIES"
      retry
    end
end

This is all well and good, it works fine and catches any timeout
exceptions, except when its trying to deal with one particular URL
(www.webdevking.com).

This URL is not currently resolving to any host. it returns "unknown
host" when you try to connect to it.
(Continue reading)

Danimal | 17 May 00:34
Picon

auto url formatting?


Hello!

I'm having a bear finding this, so I thought I'd just ask...

If I want to capture "website" as a user field (i.e. in a contacts
database)... is there an easy, automatic way to properly format it for
a link_to tag regardless of whether they include the "http" or not?
I.e. some helper or something that someone has that I could do
something like:

<%= link_to @user.website, format_url(@user.website) %>

And it would turn:

"www.google.com" # => "http://www.google.com/"

but also:

"http://www.google.com" # => "http://www.google.com/"

and:

"ftp://ftp.google.com" # => "ftp://ftp.google.com/"

I imagine there are some code snippits for doing this... I just
haven't found one yet.

Thanks!

(Continue reading)


Gmane