[Rails] Re: Problem with internationalization

2010-02-15 Thread Paweł K
Have you checked your text editor encoding? Maybe it's silly to ask about that, but some IDEs like NetBeans ocassionaly have small problems with correct encoding :) On Feb 15, 8:40 am, Ralph Shnelvar li...@ruby-forum.com wrote: I have I18n working. I translated my en.yml file to German

[Rails] Re: Problem with internationalization

2010-02-15 Thread Ralph Shnelvar
Paweł K wrote: Have you checked your text editor encoding? Maybe it's silly to ask about that, but some IDEs like NetBeans ocassionaly have small problems with correct encoding :) As far as I know, the encoding is correct. All the text editors I am using (V-Slick, Textmate, Notepad) seem to

Re: [Rails] Verify presence_of parameter

2010-02-15 Thread Colin Law
On 15 February 2010 03:07, Sean Six li...@ruby-forum.com wrote: I would like to verify a parameter is present before a search is posted. min_age = params[:min_age]  max_age = params[:max_age] @users = User.find(:all,                  :conditions = [years = ? AND years = ? min_age,

[Rails] Re: Designer - Introduction

2010-02-15 Thread AS Creative Design
Hi Gautam, Thanks for the hello. I think that question would be better answered by a developer... in other words I don't know. Sorry I couldn't be of help On Feb 13, 8:13 am, Gautam gautamrock...@gmail.com wrote: Hello Sir... Nice to see you here in the group. Can you please tell me how to

[Rails] has_many :through eager loading only loading one record

2010-02-15 Thread Jarrett
Hello, I've been using Rails for years, including has_many :through and eager loading, but this one has me stumped. The problem is that Active Record is only eager-loading the first of many records. Here are the models (note set_table_name for a legacy schema): class Tag ActiveRecord::Base

[Rails] bundle error running test on a simple app

2010-02-15 Thread ricard.forniol
I have created a new app with --edge and created a scaffold and migrated the database. When I execute 'rake test' I get this error: .bundle/gems/bundler-0.9.5/lib/bundler/resolver.rb:161:in `resolve': Could not find gem 'rails (= 0, runtime)' in git://github.com/rails/rails.git (at master).

[Rails] Re: has_many :through eager loading only loading one record

2010-02-15 Thread Frederick Cheung
On Feb 14, 11:24 pm, Jarrett jarrettco...@gmail.com wrote: Notice that in DishTagging Load, the first foreign key in the list is 58. As it turns out, there is only one DishTagging witth tag_id 58, and its dish_id is 209. Now look at Dish Load: it's loading dish 209 and nothing else. Dumb

[Rails] Re: has_many :through eager loading only loading one record

2010-02-15 Thread Frederick Cheung
On Feb 15, 8:49 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 14, 11:24 pm, Jarrett jarrettco...@gmail.com wrote: Notice that in DishTagging Load, the first foreign key in the list is 58. As it turns out, there is only one DishTagging witth tag_id 58, and its dish_id is

[Rails] Re: how do I get all records whose count of associations is above a certain number

2010-02-15 Thread Frederick Cheung
On Feb 15, 6:59 am, Peter ppgeng...@prevailhs.com wrote: And you can actually represent this in AR friendly syntax; no console in front of me but its something like Player.find(:select = players.id, :joins = :trophies, :group = 'players.id', :having = 'count(players.id) 5') Downside of

Re: [Rails] Verify presence_of parameter

2010-02-15 Thread Michael Pavling
On 15 February 2010 03:07, Sean Six li...@ruby-forum.com wrote: I tried this: min_age = params[:min_age]  max_age = params[:max_age]  if max_age.nil?   flash[:notice] = please enter max age! If there is a field called max_age on the form, but the user leaves it blank, you won't get nil from

[Rails] Re: Problem with internationalization

2010-02-15 Thread Frederick Cheung
On Feb 15, 7:40 am, Ralph Shnelvar li...@ruby-forum.com wrote: I have I18n working. I translated my en.yml file to German (de.yml) and hae set DE as the default language in environment.rb. Everything is almost working. My problem is that I am getting this   char ... instead of this  

[Rails] state select box to be populated according to country

2010-02-15 Thread Tom Mac
Hi I have the models company,country, state company belongs_to country country has_many states state belongs_to country In my company creation view i have two select boxes for country and state. I could implement the country select like % form_for @company do |f| % %=

[Rails] getting a 500 internal server error with apache

2010-02-15 Thread Gautam
System: Ubuntu 9.10 Ruby 1.8 Rails 2.3.5 Apache 2.2 MySql I am getting a 500 Internal Server Error while using apache. Everything works fine when I use Webrick I have configured all the things using this guide https://help.ubuntu.com/community/RubyOnRails#Apache Please someone help me in

[Rails] Re: state select box to be populated according to country

2010-02-15 Thread Sharagoz --
Ryan Bates got a railscasts episode that deals with this exact case: http://railscasts.com/episodes/88-dynamic-select-menus -- 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,

Re: [Rails] getting a 500 internal server error with apache

2010-02-15 Thread David Chua
Check your error_logs in your /var/log/apache/httpd directory On Mon, Feb 15, 2010 at 5:24 PM, Gautam gautamrock...@gmail.com wrote: System: Ubuntu 9.10 Ruby 1.8 Rails 2.3.5 Apache 2.2 MySql I am getting a 500 Internal Server Error while using apache. Everything works fine when I use

[Rails] help on how append html tag

2010-02-15 Thread Newb Newb
Dear all, @doc = Hpricot(open(#{RAILS_ROOT} + /public/server_exe/#{list.file_path})) i need to add img src = /ScreenCapture/#...@file_name}/ element to my @doc hpricot instance.. Please help me... how can i add the above img src element to the @doc hpricot instance.. Thank you -- Posted via

[Rails] Frustrating Problem - Acts As Tree

2010-02-15 Thread David Krett
I am a ruby on Rails Novice and I am having an extremely frustrating problem - not sure whether acts_as_tree plug in is causing this or not (or me lacking a fundamental misunderstanding of rails) I have the following table schema: create_table destinations, :force = true do |t| t.string

[Rails] Best way to go for ajax / UI interface design and Ror?

2010-02-15 Thread rubybox
Tryed several JS and java frameworks for adding a nice set of UI elements to ror applications. I know there is Jquery, Jquery widgets for Ror, The jquery UI but all those lack in some way or the other. Would there be a really cool and nice degradable framework out there that is mayor enough to

[Rails] Re: help on how append html tag

2010-02-15 Thread Newb Newb
Newb Newb wrote: Dear all, @doc = Hpricot(open(#{RAILS_ROOT} + /public/server_exe/#{list.file_path})) i need to add img src = /ScreenCapture/#...@file_name}/ element to my @doc hpricot instance.. Please help me... how can i add the above img src element to the @doc hpricot instance..

[Rails] Re: how do I get all records whose count of associations is above a certain number

2010-02-15 Thread Jon Cox
Frank Kim wrote: I have a model, let's call it Player. It has many Trophies. How do I do a simple query in Rails in my controller that will return let's say all Players that have more than 5 tropies? Sorry for the dumb question but I can't figure it out. :-) -- Frank Kim

[Rails] Re: Best way to go for ajax / UI interface design and Ror?

2010-02-15 Thread Bigos
did you try open laszlo? http://www.openlaszlo.org/ http://laszlo-plugin.rubyforge.org/ On 15 Feb, 11:33, rubybox voorr...@gmail.com wrote: Tryed several JS and java frameworks for adding a nice set of UI elements to ror applications. I know there is Jquery, Jquery widgets for Ror, The jquery

Re: [Rails] Frustrating Problem - Acts As Tree

2010-02-15 Thread Michael Pavling
On 15 February 2010 10:46, David Krett dbkr...@gmail.com wrote: I am a ruby on Rails Novice and I am having an extremely frustrating problem - not sure whether acts_as_tree plug in is causing this or not (or me lacking a fundamental misunderstanding of rails) Everything works when I test

[Rails] Re: Designer - Introduction

2010-02-15 Thread Jon Cox
AS Creative Design wrote: Hi everyone, Just thought I'd introduce myself to some fellow Rails users. I'm a Web Designer based in Glasgow, Scotland and have over 6 years industry experience as a Senior Designer, having previously worked for a graphic design agency before becoming freelance

Re: [Rails] help on how append html tag

2010-02-15 Thread Colin Law
On 15 February 2010 10:55, Newb Newb li...@ruby-forum.com wrote: Dear all, @doc = Hpricot(open(#{RAILS_ROOT} + /public/server_exe/#{list.file_path})) i need to add img src = /ScreenCapture/#...@file_name}/ element to my @doc hpricot instance.. Please help me... how can i add the above img

[Rails] Re: help on how append html tag

2010-02-15 Thread Newb Newb
Colin Law wrote: On 15 February 2010 10:55, Newb Newb li...@ruby-forum.com wrote: Dear all, @doc = Hpricot(open(#{RAILS_ROOT} + /public/server_exe/#{list.file_path})) i need to add img src = /ScreenCapture/#...@file_name}/ element to my @doc hpricot instance.. Please help me... how can i

[Rails] Re: state select box to be populated according to country

2010-02-15 Thread Tom Mac
Hi Ryan Bates got a railscasts episode that deals with this exact case: http://railscasts.com/episodes/88-dynamic-select-menus Thanks for your reply. I have tried this But is not working My rails version is 2.3.5 I have added map.connect ':controller/:action/:id.:format' to routes.r as

[Rails] Re: Problem with internationalization

2010-02-15 Thread Ralph Shnelvar
What is actually in the output - utf8 or iso latin 1 (ie look at the generated html with a hex editor) ? Fred I believe it to be iso-8859-1. I viewed the page source and saved it to disk. I hope the relevant sections are - - - - - - - (From the program WinHex which examined the page

[Rails] Re: help on how append html tag

2010-02-15 Thread Newb Newb
Any sample code or links since i can try with taht -- 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-t...@googlegroups.com. To unsubscribe from this

[Rails] Re: Frustrating Problem - Acts As Tree

2010-02-15 Thread dbkbali
Many thanks Michael, it solved the problem, and thanks for the extra advice I need it! as where I am based (Indonesia) no one teaches rails. On Feb 15, 7:39 pm, Michael Pavling pavl...@gmail.com wrote: On 15 February 2010 10:46, David Krett dbkr...@gmail.com wrote: I am a ruby on Rails

Re: [Rails] Re: help on how append html tag

2010-02-15 Thread Colin Law
On 15 February 2010 12:18, Newb Newb li...@ruby-forum.com wrote: Any sample code or links since i can try with taht You can find documentation at http://wiki.github.com/hpricot/hpricot/ with links to examples at http://wiki.github.com/hpricot/hpricot/an-hpricot-showcase. I would suggest

[Rails] What is the of backgroundRb

2010-02-15 Thread Salil Gaikwad
Hi All, I want to know what is the use of the backgroundRB. I have install all the gem related to it. I followed the instructions given in the http://backgroundrb.rubyforge.org and i successfully start background sever n also call the background method. Now i want to create a progress bar for

[Rails] Active record validation Issue

2010-02-15 Thread Web Developer
Hello, I am trying to put some validation using active records onto form fields. like this - validates_length_of :tag_list, :maximum = 2 When i provide value of tag_list as abc then it gives the proper message that length cannot be more than two. And when i provide value of tag_list as abc

[Rails] Re: getting a 500 internal server error with apache

2010-02-15 Thread Gautam
Here are my error logs... i don't understand what's going wrong...please have a look... [Mon Feb 15 14:45:51 2010] [warn] proxy: No protocol handler was valid for the URL /mynewapp. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using

[Rails] Paperclip

2010-02-15 Thread Dave Lynch
Hi, Wondering is there a way in paperclip to rename images as the are being saved to image_id+count ? my code in image.rb model has_attached_file :data, :styles = { :large = 371*251, :small = 72*72}, :url = /assets/:id, :path =

[Rails] Re: authorize state transitions

2010-02-15 Thread H.J. Blok
Brian, thanks for your answer. It works. I don't know why it didn't work the first time I was trying to authorize the state transition. Maybe I've overlooked something. Thanks, HJ Brian Hughes wrote: If you are using state_machine, this kind of thing is pretty straightforward. What you want

[Rails] Rails 3 engine plugin's routes not recognized

2010-02-15 Thread Ingo
Hi, my Rails 3 engine plugin's routes are not recognized ('No route matches...') even though they seem to get registered ok (they show up in Rails.application.routes) - any idea why anybody? Thanks! Ingo -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Form data transfer to another form with a different controle

2010-02-15 Thread Babos Cata
The forms work well, but now when I transfer the values form the first form to the second one, it automatically validates the fields. I don`t want that. It should validate them when I try to submit the data from the second form. What should I do ? Do I need to change some validation in the

Re: [Rails] Re: Form data transfer to another form with a different controle

2010-02-15 Thread Colin Law
On 15 February 2010 15:44, Babos Cata li...@ruby-forum.com wrote: The forms work well, but now when I transfer the values form the first form to the second one, it automatically validates the fields. I don`t want that. It should validate them when I try to submit the data from the second form.

[Rails] Update association on foreign key change?

2010-02-15 Thread Max Williams
I have two models, quiz and quiz_question, where quiz_question belongs to quiz. If i change the foreign key, the named association doesn't update. Can i force it to? quiz_question = QuizQuestion.last = #QuizQuestion id: 707, quiz_id: 48, question_id: 474, position: 21, low_band: 1, high_band:

Re: [Rails] Update association on foreign key change?

2010-02-15 Thread Michael Pavling
On 15 February 2010 16:27, Max Williams li...@ruby-forum.com wrote: I have two models, quiz and quiz_question, where quiz_question belongs to quiz.  If i change the foreign key, the named association doesn't update.  Can i force it to? You're better off working with Rails, rather than against

[Rails] Re: Update association on foreign key change?

2010-02-15 Thread Max Williams
Hi Michael - i kind of expected that kind of reply :) The reason that i'm doing it in this case is that i've overridden the set method for one of my foreign keys to do some other stuff after changing the foreign key. But, it just occurred to me that a better way to handle that is via a dirty

[Rails] Object.subclasses_of gone

2010-02-15 Thread Julien Palmas
Hi list, With Rails 3 beta, activesupport/lib/active_support/core_ext/object/extending.rb is gone, and with it Object.subclasses_of. Is there an official replacement for that ? Maybe in Ruby 1.8.7 ? Cordialement, Julien Palmas 05 82 95 00 73 06 07 47 85 87 jul...@cruxandco.com -- You

[Rails] Changing the :path and :url options of has_attached_file in paperclip

2010-02-15 Thread @shaan
Hello, I am using the paperclip plugin to upload images and it works absolutely fine. I intend to save my uploaded images to C:\Application_name\public folder. Accordingly, with some study over the i-net, I changed the :path option of has_attached_file to - :path = C:/Application_name/

[Rails] Re: grouped_options_for_select

2010-02-15 Thread Dave Lynch
Dave Lynch wrote: Sharagoz -- wrote: Since this you are using form_for you want to use f.select not select_tag like in my example. Thanks Sharagoz I had tried % option_groups_from_collection_for_select(@parent, :childern, :name, :id, :name) % But was getting a undefined method

[Rails] Re: Re: Form data transfer to another form with a different controle

2010-02-15 Thread Babos Cata
It seems like the first form sends data to the database using the second form (beeing wierd), insted of simply sending data to the second form. -- 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

[Rails] Re: Problem with internationalization

2010-02-15 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: What is actually in the output - utf8 or iso latin 1 (ie look at the generated html with a hex editor) ? Fred I believe it to be iso-8859-1. I viewed the page source and saved it to disk. I hope the relevant sections are - - - - - - - (From the program

[Rails] User stamping and Authlogic

2010-02-15 Thread Marnen Laibow-Koser
[I originally posted this to the Authlogic group, but since it's more of a general Rails issue, I'm reposting it here. Since I wrote the original, I've been leaning more toward using Thread.current.] Hi folks. I have what seems like a common problem, but I can't seem to find a good answer to

Re: [Rails] HELP ON HTML CONTENT MODIFICATION

2010-02-15 Thread Lasse Bunk
Here's a hpricot example that works: require 'rubygems' require 'hpricot' doc = Hpricot(htmlbodypimg src=\/2010-01-12/Capture/1210420100112145725141.jpg\ //p/body/html) doc.search('img').each do |img| img['src'] = img['src'].gsub(/^\/\d{4}-\d{2}-\d{2}/, ) # have to do gsub – gsub! doesn't

[Rails] Using local system-wide gems when using gem bundler

2010-02-15 Thread Marcelo de Moraes Serpa
Gem bundle is a great tool, but I'm breaking my head here to try to solve what seems to be a simple issue. Right now, we follow a very minimalist philosophy - if it is not needed, then don't install it. For example, I use mongrel locally for development, while my co-worker uses unicorn. In

Re: [Rails] Active record validation Issue

2010-02-15 Thread Lasse Bunk
Are you using the acts_as_taggable plugin? 'Cause then tag_list varies between string and array. Don't know if that's the case here though. --Lasse 2010/2/15 Web Developer li...@ruby-forum.com Hello, I am trying to put some validation using active records onto form fields. like this -

Re: [Rails] Re: state select box to be populated according to country

2010-02-15 Thread Lasse Bunk
You need to but dynamic_states.js in your public/javascripts folder. --Lasse 2010/2/15 Tom Mac li...@ruby-forum.com Hi Ryan Bates got a railscasts episode that deals with this exact case: http://railscasts.com/episodes/88-dynamic-select-menus Thanks for your reply. I have tried this

Re: [Rails] Object.subclasses_of gone

2010-02-15 Thread Xavier Noria
On Mon, Feb 15, 2010 at 5:49 PM, Julien Palmas jul...@cruxandco.com wrote: Hi list, With Rails 3 beta, activesupport/lib/active_support/core_ext/object/extending.rb is gone, and with it Object.subclasses_of. Is there an official replacement for that ? Maybe in Ruby 1.8.7 ? Hey Julien,

Re: [Rails] Re: getting a 500 internal server error with apache

2010-02-15 Thread Lasse Bunk
A quick Google turned up this: http://serendipity.ruwenzori.net/index.php/2006/12/24/proxy-no-protocol-handler-was-valid-for-the-url Sounds like it's something with mod_proxy... --Lasse 2010/2/15 Gautam gautamrock...@gmail.com Here are my error logs... i don't understand what's going

Re: [Rails] making a new project, should I choose rails 2.3.5 or 3.0 .0 beta?

2010-02-15 Thread ben wiseley
I just had to make a similar decision. In order to get something going quickly I stuck with 2.3.5. Rails 3 seems great, but most of the plugins I tried had issues so I decided to wait. -ben On Sun, Feb 14, 2010 at 11:03 PM, Conrad Taylor conra...@gmail.com wrote: On Sun, Feb 14, 2010 at

[Rails] [ANN] Red Dirt RubyConf: Rails 3 Theme

2010-02-15 Thread JEG2
I just wanted to make sure the Rails community is aware of the Red Dirt RubyConf (http://reddirtrubyconf.com/). While we are a Ruby conference, we've planned a lot of Rails content with entire sections on Rails 3 (http://reddirtrubyconf.com/theme/rails3), Servers/Hosting

Re: [Rails] Changing the :path and :url options of has_attached_file in paperclip

2010-02-15 Thread Philip Hallstrom
On Feb 15, 2010, at 8:13 AM, @shaan wrote: Hello, I am using the paperclip plugin to upload images and it works absolutely fine. I intend to save my uploaded images to C:\Application_name\public folder. Accordingly, with some study over the i-net, I changed the :path option of

[Rails] Re: Problem with internationalization

2010-02-15 Thread Ralph Shnelvar
Yes, that seems to be Latin-1. Why are you using Latin-1 and not UTF-{8|16} in the first place? They are supersets of Latin-1. I am aware of this, Marnen. What I don't know is how to get Ruby/Rails to generate UTF-8 and/or Unicode. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//DE

[Rails] Rails 3: Can Bundle.require be called after Application class is defined?

2010-02-15 Thread szimek
Hi, I'm trying to use shoulda in Rails 3 and there's a small problem. I'm using branch rails3 from shoulda repository - http://github.com/thoughtbot/shoulda/tree/rails3. The problem is that shoulda tries to auto load some files from predefined paths and uses Rails.root to build these paths,

[Rails] Re: forcing lower case in form helper label

2010-02-15 Thread kwe...@pobox.com
On Feb 14, 8:31 am, Ralph Shnelvar li...@ruby-forum.com wrote: Lasse Bunk wrote: f.label :something, something :-) Lasse 2010/2/14 Ralph Shnelvar li...@ruby-forum.com Well ... that certainly was simple but then what is the purpose of the first parameter?  What are the downsides

[Rails] Re: Problem with internationalization

2010-02-15 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: Yes, that seems to be Latin-1. Why are you using Latin-1 and not UTF-{8|16} in the first place? They are supersets of Latin-1. I am aware of this, Marnen. What I don't know is how to get Ruby/Rails to generate UTF-8 and/or Unicode. Why do you think you need to

[Rails] How to deal with user requests that take time to process?

2010-02-15 Thread PierreW
Hi guys, Could you recommend a common design for the following case (or point me in the right direction): - the user makes a request - the server processes is it, but the process is long therefore it is split into chunks. - the page is rendered with the first chunk - when another chunk is ready,

[Rails] Multi cache on Rails

2010-02-15 Thread Gabriel Eisbruch
Hi, I want to cache a objets group into a memcached pool and other group (differents classes) in other memcached pool, is it possible? For example: i want to store properties into a local memcached and the sessions stored in a memcached pool Thank -- You received this message because you are

[Rails] will_paginate question

2010-02-15 Thread Bigos
I have a Persons table created with scaffold. I was trying to flick between records by clicking on Previous and Next links. I was struggling to understand will_paginate, and finally came up with following solution, and I'm wondering if it could be done better. Would it be better to have one query

Re: [Rails] making a new project, should I choose rails 2.3.5 or 3.0 .0 beta?

2010-02-15 Thread Conrad Taylor
On Mon, Feb 15, 2010 at 9:17 AM, ben wiseley wisel...@gmail.com wrote: I just had to make a similar decision. In order to get something going quickly I stuck with 2.3.5. Rails 3 seems great, but most of the plugins I tried had issues so I decided to wait. -ben Ben, did you file tickets

Re: [Rails] making a new project, should I choose rails 2.3.5 or 3.0 .0 beta?

2010-02-15 Thread ben wiseley
No - I didn't. I didn't realize we were supposed to do that but I'll start. Sorry about that. I just figured that was a plugins need to be updated issue and not a Rails 3 issue. -ben On Mon, Feb 15, 2010 at 11:53 AM, Conrad Taylor conra...@gmail.com wrote: On Mon, Feb 15, 2010 at 9:17 AM,

[Rails] Re: Red Dirt RubyConf: Rails 3 Theme

2010-02-15 Thread btomlin
What is the pricing and how do you register? I don't see that information on the site -- 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-t...@googlegroups.com. To unsubscribe from this group,

[Rails] Re: Red Dirt RubyConf: Rails 3 Theme

2010-02-15 Thread btomlin
Never mind. I found it. It's a very small link in the footer; however, registration is not available yet. On Feb 15, 2:11 pm, btomlin websit...@gmail.com wrote: What is the pricing and how do you register? I don't see that information on the site -- You received this message because you are

[Rails] Re: basic email

2010-02-15 Thread Richard Schneeman
I recommend http://guides.rubyonrails.org/action_mailer_basics.html it is a good place to get started. If you had a mailer named CraigMailer and you had the message defined like above class CraigMailer ActionMailer::Base def message(mail) subject mail[:message].subject from

Re: [Rails] making a new project, should I choose rails 2.3.5 or 3.0 .0 beta?

2010-02-15 Thread Conrad Taylor
On Mon, Feb 15, 2010 at 11:59 AM, ben wiseley wisel...@gmail.com wrote: No - I didn't. I didn't realize we were supposed to do that but I'll start. Sorry about that. I just figured that was a plugins need to be updated issue and not a Rails 3 issue. -ben Ben, it's simply recommendation

Re: [Rails] Re: Problem with internationalization

2010-02-15 Thread Lasse Bunk
I tried to read through the thread but didn't actually find an answer... Isn't the solution to make sure that en.yml is UTF-8 encoded, ie it in UTF-8? --Lasse 2010/2/15 Marnen Laibow-Koser li...@ruby-forum.com Ralph Shnelvar wrote: Yes, that seems to be Latin-1. Why are you using Latin-1

[Rails] Re: Re: Problem with internationalization

2010-02-15 Thread Marnen Laibow-Koser
Lasse Bunk wrote: I tried to read through the thread but didn't actually find an answer... Isn't the solution to make sure that en.yml is UTF-8 encoded, ie it in UTF-8? That's part of the solution, yes -- this is another case of Rails simply processing the text you give it. Sorry; I should

Re: [Rails] will_paginate question

2010-02-15 Thread Lasse Bunk
Rewriting your example a little, I think I would do it like this: # controller @person = Person.find(params[:id]) @person_previous = Person.first, :order = 'id DESC', :conditions = [id ?, @person.id] @person_next = Person.first, :order = 'id ASC', :conditions = [id ?, @ person.id] # view %=

Re: [Rails] Re: Re: Form data transfer to another form with a different controle

2010-02-15 Thread Colin Law
On 15 February 2010 17:33, Babos Cata li...@ruby-forum.com wrote: It seems like the first form sends data to the database using the second form (beeing wierd), insted of simply sending data to the second form. What do you mean 'sending data to the second form'? When a form is submitted the

[Rails] Re: Re: Re: Form data transfer to another form with a different controle

2010-02-15 Thread Babos Cata
Colin Law wrote: On 15 February 2010 17:33, Babos Cata li...@ruby-forum.com wrote: It seems like the first form sends data to the database using the second form (beeing wierd), insted of simply sending data to the second form. What do you mean 'sending data to the second form'? When a form

[Rails] XML encoding

2010-02-15 Thread Carlos Pol
Hello, I generate a .xml using the function to_xml format.xml { render :xml = @pisos.to_xml(:methods = [:provincia_nombre, :ayuntamiento_nombre]) } And the xml is encoded with UTF-8, I would like to know how to encode the xml with ISO 8859-1 or another one. Thank you -- Posted

[Rails] Re: will_paginate question

2010-02-15 Thread Paul Harrington
Jacek Podkanski wrote: I have a Persons table created with scaffold. I was trying to flick between records by clicking on Previous and Next links. I was struggling to understand will_paginate, and finally came up with following solution, and I'm wondering if it could be done better. Would it

[Rails] Re: will_paginate question

2010-02-15 Thread EvanC
Hi Bigos, You aren't using the view helper will_paginate gives you. It's as simple as: @people = Person.paginate :page = params[:page] And in your view: %= will_paginate @posts % This will automatically generate the 'Previous' and 'Next' links. For further questions there is a dedicated

[Rails] JOBS: Ruby on Rails Architect/developers in NYC

2010-02-15 Thread SilverSearch Inc Jobs
If interested, please email your resume at j...@silversearchinc.com along with a time number to best reach you. Please put subject as RUBY ON RAILS, NYC My firm has been brought on board to assist a global software giant within the financial industry with their immediate need to hire 2-3 of the

[Rails] Re: Re: Re: Form data transfer to another form with a different controle

2010-02-15 Thread Babos Cata
Thank you again for you fast reply. Indeed I started working with some basic forms and debugging methods. I tried some examples but non works, yet. I want something like the simple php function, fill a form then send the values from the input tags in another form. So I got a simple

Re: [Rails] Re: will_paginate question

2010-02-15 Thread Lasse Bunk
As I understand it, what he wants to do is not really pagination. Pagination is users?page=1 but what he wants is to be at user/10 and when he clicks next, it goes to user/11, when previous, user/9. --Lasse 2010/2/15 EvanC e...@cancelliere.ca Hi Bigos, You aren't using the view helper

Re: [Rails] Re: will_paginate question

2010-02-15 Thread Lasse Bunk
Oops, of course the url's should be users/10, users/9 and users/11 :) --Lasse 2010/2/15 Lasse Bunk lasseb...@gmail.com As I understand it, what he wants to do is not really pagination. Pagination is users?page=1 but what he wants is to be at user/10 and when he clicks next, it goes to

[Rails] Re: Re: will_paginate question

2010-02-15 Thread Paul Harrington
Lasse Bunk wrote: As I understand it, what he wants to do is not really pagination. Pagination is users?page=1 but what he wants is to be at user/10 and when he clicks next, it goes to user/11, when previous, user/9. --Lasse 2010/2/15 EvanC e...@cancelliere.ca Thats definitely still

[Rails] Re: will_paginate question

2010-02-15 Thread Bigos
Eureka!!! Now I know why I was getting urls like users?page2. I have learned a lot over last few days, but please forgive me asking silly questions. I still get confused, perhaps I'm trying to learn to much too soon. Anyway, thank you all for the code examples, I will have a closer look at them

Re: [Rails] Re: Update association on foreign key change?

2010-02-15 Thread Michael Pavling
On 15 February 2010 16:45, Max Williams li...@ruby-forum.com wrote: Hi Michael - i kind of expected that kind of reply :) If you've got special reasons why you think you need to pursue the route you have, it would help if you mention those in your initial post. Anyway... The reason that i'm

[Rails] Re: Red Dirt RubyConf: Rails 3 Theme

2010-02-15 Thread JEG2
On Feb 15, 2:13 pm, btomlin websit...@gmail.com wrote: Never mind. I found it. It's a very small link in the footer; however, registration is not available yet. Correct. We plan to open registration on March 5th when we have the program locked in. That's what we are working on now. James

Re: [Rails] How to upgrade my version of my rails application.

2010-02-15 Thread Jeffrey L. Taylor
Quoting sam swaminadhank...@gmail.com: Hello experts! I am having problem while upgrading my rails version from 1.2.3 to 2.3.4. I suggest upgrading from 1.2.3 to 1.2.6, fix the deprecation warnings; upgrade to 2.0.X, fix any problems, then go to 2.3.4 (or even better

[Rails] simpler alternative to Capistrano for single instance deployments?

2010-02-15 Thread greghauptmann
Hi, Just wondering if there is simpler deployment tool for Rails apps than Capistrano that is popular? For simple single server hosted deployments, here's where my source code is, don't include these files, deploy to this path on this server type thing. To some extent I guess I'm describing

[Rails] Iterating between two values captured in a form

2010-02-15 Thread John Merlino
Hey all, What would be the best way to iterate between two numeric values captured in a form? Something like: UserRequest.find(params[:user_request]) (attribute1...attribute2).each {|x1,x2| } Something like this possible? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: simpler alternative to Capistrano for single instance deployments?

2010-02-15 Thread Jarin Udom
Moonshine takes Capistrano and makes it insanely easy, if you are running on an Ubuntu VPS or dedicated server (think Slicehost or similar). I gave a talk recently at SD Ruby that is a good overview of what it does: http://jarinheit.com/a-talk-i-gave-at-sd-ruby-deploying-rails-apps Jarin Udom

[Rails] Re: simpler alternative to Capistrano for single instance deployments?

2010-02-15 Thread Jarin Udom
By the way, forgot to mention that the real strength of Moonshine for simple setups is that the default configuration works amazingly well. You can go from a bare Ubuntu server with only ssh to a fully-running Rails app in around 10 minutes with maybe 5 lines of configuration. Jarin On Feb 15,

[Rails] Saving Retrieving Ranges

2010-02-15 Thread Chris Dempsey
I would like to be able to save a set of age brackets as a range and have it treated as a Ruby range when retrieved from the database. I've done quite a bit of searching (maybe my Google-fu just sucks) but haven't had any luck in getting to an answer. Anyone have any thoughts on doing this or

[Rails] Re: simpler alternative to Capistrano for single instance d

2010-02-15 Thread Marnen Laibow-Koser
greghauptmann wrote: Hi, Just wondering if there is simpler deployment tool for Rails apps than Capistrano that is popular? Capistrano is quite simple. For simple single server hosted deployments, here's where my source code is, don't include these files, deploy to this path on this

[Rails] Re: Iterating between two values captured in a form

2010-02-15 Thread Marnen Laibow-Koser
John Merlino wrote: Hey all, What would be the best way to iterate between two numeric values captured in a form? Something like: UserRequest.find(params[:user_request]) (attribute1...attribute2).each {|x1,x2| } Something like this possible? Thanks. Yes, pretty much as you

[Rails] Re: simpler alternative to Capistrano for single instance deployments?

2010-02-15 Thread greghauptmann
Jarin - noting it has Capistrano under the bonnet what does Moonshine add exactly? When/why would you use Moonshine (with Cap) over just Capistrano by itself? thanks Greg On Feb 16, 12:29 pm, Jarin Udom ja...@robotmo.de wrote: By the way, forgot to mention that the real strength of Moonshine

[Rails] Re: Changing the :path and :url options of has_attached_file in paperclip

2010-02-15 Thread @shaan
Hello Philip, I have tried this, but unfortunately it has not worked. I can only see the image file name with a cross icon, but the image can't be seen. Some additional information - in the log, I can see this error (just in case it helps): ActionController::RoutingError (No route matches

Re: [Rails] Saving Retrieving Ranges

2010-02-15 Thread Rob Biedenharn
On Feb 15, 2010, at 9:31 PM, Chris Dempsey wrote: I would like to be able to save a set of age brackets as a range and have it treated as a Ruby range when retrieved from the database. I've done quite a bit of searching (maybe my Google-fu just sucks) but haven't had any luck in getting

[Rails] YAML, UTF-8, TextMate, Notepad

2010-02-15 Thread Ralph Shnelvar
This is not a question but a report on the difficulties I had and the solution I found with respect to UTF-8, YAML::load, and Ruby/Rails. Comments are appreciated. - - - I had been struggling for two days to get UTF-8 working in my Rails app. I had/have a localization file, lib\locale\de.yml,

[Rails] Controller won't accept a variable number of inputs...

2010-02-15 Thread AlwaysCharging
I’m using Prototype to allow the user to add form fields dynamically. However, each field is the same model over and over again (think of it as allowing the user to create a lot of Blog posts at once). So I’m unable to use accepts_nested_attributes_for, since each blog is its own row in the

[Rails] Re: Re: state select box to be populated according to country

2010-02-15 Thread Tom Mac
Lasse Bunk wrote: You need to but dynamic_states.js in your public/javascripts folder. --Lasse But how is it possible? In screencast it is dynamic_states.js.erb that contains both ruby and javascript code. So how can i put that to public/javascripts? Tom -- Posted via

[Rails] [RAILS] ActiveMerchant and Wirecard question

2010-02-15 Thread David Angga
Hi all, i'm developing a webapps that implement ActiveMerchant and Wirecard payment gateway. my question's : 1. is wirecard have a sandbox like paypal did? 2. where can i get a test account for this? thanks. -- David Angga Prasetya Ruby on Rails developer @ http://kiranatama.com - a Ruby on

  1   2   >