[Rails] Re: One Array - 3 Columns of Equal Length

2010-05-31 Thread tonypm
in_groups and in_groups_of part of rails api - hadn't spotted those before and would never have thought of looking for them. I often wonder how many other useful little goodies I may be missing. Always useful to keep an eye on this group. thanks Marnen -- You received this message because

[Rails] Re: [Rails 3] Path helper not working as expected with form_for

2010-05-31 Thread Michael Jurewitz
So it would seem that there is huge level of subtly in how these path helpers behave based on how your pluralize the helper. So, what I should have written (and what now appears to work) was: %= form_for @thread, :as = :thread, :url = thread_message_path(@thread, @message) do |f| % So that's

[Rails] has_many and has_and_belongs_to conflit

2010-05-31 Thread David B.
Hi, I have 2 models: User and Article. I have this relationship: * User has many articles (and Article belongs to user) * User has and belongs to many articles (and Article habtm users) But this is tricky because of: current_user.articles ...this can return articles thanks to *has_many* and

[Rails] Rails 3 UJS and delete action

2010-05-31 Thread mrbana...@googlemail.com
Hi, I ve got a question concerning delete actions in the new rails 3 world with unobtrusive javascript. How may I perform an ajax delete in a list of products. if attribute data-method is specified rails.js handleMethod is called, which adds csrf params into a hidden form and form.submit is

Re: [Rails] Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP?

2010-05-31 Thread Conrad Taylor
On Sun, May 30, 2010 at 10:42 PM, dave4...@greatchiro.com dave.hurr...@gmail.com wrote: Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP? It does not work for me, the sample program crashes with no error message. Dave, the recommended Ruby version for Rails 3.0 Beta 3 is Ruby

[Rails] Re: Change the column name field in error message

2010-05-31 Thread Chris Bartlett
Put this in the model: HUMAN_ATTRIBUTES = {:some_column = 'Column display name', :some_other_column = 'Another column display name'} def self.human_attribute_name(attr) HUMAN_ATTRIBUTES[attr.to_sym] || super end Obviously you want to replace my examples (:some_column, 'Column display name',

[Rails] Re: Trying to make new instance variables for each item in render :partial

2010-05-31 Thread Frederick Cheung
On May 31, 6:25 am, Bob Smith bsm...@gmail.com wrote: I have a list of people I am using as the collection for a render :partial. This is for a list of users that is being made into a pdf. I need to do 3 find calls to find out their attendance for the last 3 years. The only way I can find to

[Rails] Re: has_many and has_and_belongs_to conflit

2010-05-31 Thread Frederick Cheung
On May 31, 8:49 am, David B. li...@ruby-forum.com wrote: Hi, But this is tricky because of: current_user.articles ...this can return articles thanks to *has_many* and *has_and_belongs_to* relations.  So there's a collision. How can I ask articles thanks has_and_belongs_to explicitly.  

Re: [Rails] Re: One Array - 3 Columns of Equal Length

2010-05-31 Thread Michael Pavling
On 31 May 2010 07:16, tonypm tonypmar...@hotmail.com wrote: I often wonder how many other useful little goodies I may be missing. The have a page through the API docs... it's all in there! There's interesting stuff in both the Ruby [1] and Rails [2] APIs. You'll learn loads from looking through

[Rails] Re: has_many and has_and_belongs_to conflit

2010-05-31 Thread David B.
Frederick Cheung wrote: On May 31, 8:49�am, David B. li...@ruby-forum.com wrote: Call one of the relationships something else, eg has_many :something_articles, :class_name = Article Fred Thank you Fred -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] Multiple calls of validate() method in composed model by ActiveRecord, why?

2010-05-31 Thread ms
Hi, thank you for reading my post. When I went trough my logs last time, I noticed that ActiveRecord calls the validate() method of one of my models multiple times. The concerned model acts like a linked list (no plug-in) and references itself. The validate() method is not only called twice, but

[Rails] TCPSocket.new(host,port).readline hangs on windows :(

2010-05-31 Thread Pieter Hugo
Hi Guys I am starting a new thread as it seems my gripe isnt to do with Juggernaut but with TCPSocket - which is used by Juggernaut. Turns out that the thing that actually hangs up in Juggernaut after x (130/1500/16000) iterations of (1..1000).each {|i| Juggernaut.show_clients} Is actually the

[Rails] File links in browser

2010-05-31 Thread Hemant Bhargava
Basically, if i open an txt file in firefox using File Open file then file is opening perfectly. But if i try to open a txt file from a file link on a webpage file:///path it is not going anywhere? Can i fix that in ROR ? If i can, then what is the way to get rid of this ? -- Posted via

[Rails] Ruby breakpoint has weird idea of what local_variables are?

2010-05-31 Thread RichardOnRails
Hi, I've got a 7-liner: require 'rubygems' require 'breakpoint' a = 'aaa' b = 'bbb' breakpoint c = 'ccc' In a Command window, I've got: K:\_Projects\Ruby\_Ruby_Tests\TestBreakpointruby TestBreakpoint.rb Executing break point at TestBreakpoint.rb:9 irb(main):001:0 local_variables = [id, block,

Re: [Rails] File links in browser

2010-05-31 Thread Hassan Schroeder
On Mon, May 31, 2010 at 6:07 AM, Hemant Bhargava li...@ruby-forum.com wrote: Basically, if i open an txt file in firefox using File Open file then file is opening perfectly. But if i try to open a txt file from a file link on a webpage file:///path it is not going anywhere? ? What *exactly*

[Rails] Re: File links in browser

2010-05-31 Thread Hemant Bhargava
Hassan Schroeder wrote: On Mon, May 31, 2010 at 6:07 AM, Hemant Bhargava li...@ruby-forum.com wrote: Basically, if i open an txt file in firefox using File Open file then file is opening perfectly. But if i try to open a txt file from a file link on a webpage file:///path it is not going

Re: [Rails] Re: File links in browser

2010-05-31 Thread Larry Meadors
I'm lost. What does this have to do with rails? Sounds like a browser problem. :-/ Larry -- 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] ROR Sample applications for training

2010-05-31 Thread Pepe Sanchez
Hi all I am currently looking for any ROR sample applciation used for training. I am in the processes of collecting requirements/analyzing/designing a web site that will provide training -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] how to correctly load attachment_fu with an initializer?

2010-05-31 Thread rubybox
I seem to be getting 2 errors, Attachment_fu properties are not set S3 is complaining ( Im not using it) S3: Processing ApplicationController#index (for 127.0.0.1 at 2010-05-31 16:49:10) [GET] NameError (undefined local variable or method `attachment_options' for #Class:0x105870a40):

Re: [Rails] ROR Sample applications for training

2010-05-31 Thread tramuntanal
Hi Pepe, Do you want to collaborate with open source projects? Regards 2010/5/31 Pepe Sanchez li...@ruby-forum.com: Hi all I am currently looking for any ROR sample applciation used for training. I am in the processes of collecting requirements/analyzing/designing a web site that will

Re: [Rails] Re: File links in browser

2010-05-31 Thread Hassan Schroeder
On Mon, May 31, 2010 at 7:16 AM, Hemant Bhargava li...@ruby-forum.com wrote: Basically, if i open an txt file in firefox using File Open file then file is opening perfectly. But if i try to open a txt file from a file link on a webpage file:///path it is not going anywhere? By this i mean

[Rails] Flash not deleting with Redis/Memcache store

2010-05-31 Thread Jon Brisbin
I'm a recent convert to Rails and I'm working on a new project using Rails 2.3 (I'll probably upgrade at some point when Rails 3 is in production and had a chance to bake the .0 bugs out). I'm going to use Redis anyway for caching important data, so I thought I'd use the redis-store:

[Rails] Rails 3 timezone error

2010-05-31 Thread JSchwindt
I am struggling with time zone support in Rails 3 beta and I would like to know if it is a bug or if I am doing something wrong. He is the problem: Time.zone = 'Madrid' # it is GMT+2 = Madrid c = Comment.new = #Comment id: nil, title: , pub_at: nil c.pub_at = Time.zone.parse('10:00:00') =

[Rails] Re: Multiple calls of validate() method in composed model by ActiveRecord, why?

2010-05-31 Thread Frederick Cheung
On May 31, 11:50 am, ms m...@tzi.de wrote: Hi, thank you for reading my post. When I went trough my logs last time, I noticed that ActiveRecord calls the validate() method of one of my models multiple times. The concerned model acts like a linked list (no plug-in) and references itself.

[Rails] ckeditor Browse Server

2010-05-31 Thread Ned Pearson
I started with the ckeditor rails demo and everything worked beautifully. Then I deployed a couple of sites using a heavily customized Easy toolbar and everything works great. In these instances I completely disable any file upload or management capability. Next, I implemented the Full version

[Rails] Re: ROR Sample applications for training

2010-05-31 Thread Pepe Sanchez
Sure!! Sure!!! tramuntanal wrote: Hi Pepe, Do you want to collaborate with open source projects? Regards 2010/5/31 Pepe Sanchez li...@ruby-forum.com: To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: ROR Sample applications for training

2010-05-31 Thread tramuntanal
Hi again, Here's a Scrum management tool at version 0.9: http://sourceforge.net/projects/windsofscrum/ It's based on Henrik Kniberg's book Scrum and XP from the Trenches available at InfoQ. Maybe you can collect requirements/analyze/design new cool features. Take a look at it and contact me, you

[Rails] Re: How would I create a tagged domain?

2010-05-31 Thread Joe
Bump?! Please, can anyone help? On 30 May, 09:16, Joe j...@dev-hq.co.uk wrote: Hi, Basically I recently been playing around with my ruby on rails system, and I'm wondering how I can get it to pick some words from the :name of the tutorial (I have a system with categories and tutorials) and

[Rails] Freezing non-rails gems

2010-05-31 Thread Adam Ms.
Hello, What is the 2010 way to get my non-rails gems frozen into my app? TIA! a. -- 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

[Rails] Re: Re: File links in browser

2010-05-31 Thread Marnen Laibow-Koser
Hassan Schroeder wrote: On Mon, May 31, 2010 at 7:16 AM, Hemant Bhargava li...@ruby-forum.com wrote: Basically, if i open an txt file in firefox using File Open file then file is opening perfectly. But if i try to open a txt file from a file link on a webpage file:///path it is not going

[Rails] Re: ROR Sample applications for training

2010-05-31 Thread Anton Zibrov
Agile Web Development with Rails, Edition 4 http://intertwingly.net/projects/AWDwR4/checkdepot/index.html -- 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

[Rails] Re: Freezing non-rails gems

2010-05-31 Thread Marnen Laibow-Koser
Adam Ms. wrote: Hello, What is the 2010 way to get my non-rails gems frozen into my app? rake gems:unpack , for Rails 2.x. Rails 3 uses Bundler. TIA! a. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: Ruby breakpoint has weird idea of what local_variables a

2010-05-31 Thread Marnen Laibow-Koser
RichardOnRails wrote: Hi, I've got a 7-liner: require 'rubygems' require 'breakpoint' a = 'aaa' b = 'bbb' breakpoint c = 'ccc' In a Command window, I've got: K:\_Projects\Ruby\_Ruby_Tests\TestBreakpointruby TestBreakpoint.rb Executing break point at TestBreakpoint.rb:9

[Rails] Chat app, Caching? Observe?

2010-05-31 Thread Greg Ma
Hi, I am developping a little chat application with rails. On my chat page I make ajax request every 10 seconds to check if there are news messages. I think if I keep this thing with a lot of user my performance will get really low. How can I improve this? Is is possible to observe when a row is

Re: [Rails] Chat app, Caching? Observe?

2010-05-31 Thread Marc Byrd
You might have a look at node.js - I've heard recently of apps which combine node.js w/ redis pubsub to get a pretty nifty quick experience w/ no polling. From a scalability and performance point of view, this has a couple of drawbacks - susceptible to network latencies, quality (may be better

Re: [Rails] Re: Automatically decrement value each day

2010-05-31 Thread João Paulo Freire
no scheduler solution: why not use created_at or updated_at? simply get current date than compute days since your prefered event and make it half... On Sun, May 30, 2010 at 6:26 PM, Becky Russoniello li...@ruby-forum.comwrote: Wow! Perfect. Thank you so much. Sharagoz wrote: I would

[Rails] Re: Chat app, Caching? Observe?

2010-05-31 Thread Marnen Laibow-Koser
Greg Ma wrote: Hi, I am developping a little chat application with rails. On my chat page I make ajax request every 10 seconds to check if there are news messages. I think if I keep this thing with a lot of user my performance will get really low. It shouldn't if you structure your queries

[Rails] Re: ckeditor Browse Server

2010-05-31 Thread Ned Pearson
Ned Pearson wrote: I started with the ckeditor rails demo and everything worked beautifully. Then I deployed a couple of sites using a heavily customized Easy toolbar and everything works great. In these instances I completely disable any file upload or management capability. Next, I

[Rails] Re: Ruby breakpoint has weird idea of what local_variables a

2010-05-31 Thread RichardOnRails
Geez, Marnen, I don't see why people on a list focused on the most famous Ruby app would view it beneath themselves to address a fundamental Ruby question. Incidentally, my question is, in fact, related to a Rails - a Rails application. My client for the Rails app wants to change a bunch of

[Rails] Re: Ruby breakpoint has weird idea of what local_variables a

2010-05-31 Thread Marnen Laibow-Koser
RichardOnRails wrote: Geez, Marnen, I don't see why people on a list focused on the most famous Ruby app would view it beneath themselves to address a fundamental Ruby question. It's not that they see it as beneath themselves. It's simply that this is a forum for Rails issues, and only

[Rails] constant didn't update?

2010-05-31 Thread minka
A very puzzling thing has happened. Any ideas on this? I have two rates for this service I provide. 5 cents per line 10 cents per line I updated the latter to 20 cents per line, and made other changes to my site. I use a constant for the rate so I did this: EXEC_RATE = 20 // used to be,

Re: [Rails] constant didn't update?

2010-05-31 Thread Michael Pavling
// is not a ruby comment Change it to # and see what happens. (Sorry for top-posting - mobile phone has awful email client) On May 31, 2010 9:31 PM, minka beesupp...@beelucid.com wrote: A very puzzling thing has happened. Any ideas on this? I have two rates for this service I provide. 5

[Rails] Re: constant didn't update?

2010-05-31 Thread minka
Thanks for the feedback, actually the line is EXEC_RATE = 20 # cents per line, convert and exec So that could not be it. I have also checked in my IDE, and the new value is showing up in my local development environment. The new value is on the production machine, in the production code. BUT

Re: [Rails] Re: constant didn't update?

2010-05-31 Thread Colin Law
On 31 May 2010 21:55, minka beesupp...@beelucid.com wrote: Thanks for the feedback, actually the line is  EXEC_RATE = 20  # cents per line, convert and exec So that could not be it. I have also checked in my IDE, and the new value is showing up in my local development environment. The new

[Rails] Re: ActiveRecord model relationship with YAML file

2010-05-31 Thread Marnen Laibow-Koser
Paul A. wrote: Hi, I have an ActiveRecord model Group and a YAML table stored in config/users.yaml just like: - {login: titi, password: 123456, group_id: 2} - {login: toto, password: 987654, group_id: 7} And I would like to link them by a sexy way. Can you help me? I would

[Rails] Re: ActiveRecord model relationship with YAML file

2010-05-31 Thread Paul A.
Marnen Laibow-Koser wrote: This will probably be easier in Rails 3, but not impossible in Rails 2. Which are you using? Thank for your quick answer. I'm using Rails 3 :p -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: ActiveRecord model relationship with YAML file

2010-05-31 Thread Paul A.
Hmm, http://github.com/zilkey/active_hash looks very cool. And Rails 3 ready. But it do not allow habtm relations :s -- 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

[Rails] Showing 404 page from controller in Rails 3

2010-05-31 Thread Joshua Partogi
Hi all, I want to be able to display 404 page from a controller when a record in the database can not be found. I am using Rails 3 at the moment. I tried to find how to do this on guides.rails.info with no luck. Can anybody recommend the best approach to do this? Thanks heaps for your help and

[Rails] Combining Two Models into one form

2010-05-31 Thread Matias Niemela
Hey Guys. I'm very new with rails and I've been building a CMS application backend. All is going well, but I would like to know if this is possible? Basically I have two models: @page { id, name, number } @extended_page { id, page_id, description, image } The idea is that there are bunch of

[Rails] Is there a way to obtain the body of the last render?

2010-05-31 Thread dave4...@greatchiro.com
Is there a way to obtain the response body of the last render in Rails3 beta3? For example, given: render :action='aaa', :layout='bbb' I had thought something like @_current_render would work but it did not, it is nil. -- You received this message because you are subscribed to the Google

Re: [Rails] Showing 404 page from controller in Rails 3

2010-05-31 Thread Jeffrey L. Taylor
Quoting Joshua Partogi joshua.part...@gmail.com: Hi all, I want to be able to display 404 page from a controller when a record in the database can not be found. I am using Rails 3 at the moment. I tried to find how to do this on guides.rails.info with no luck. Can anybody recommend the

[Rails] Re: Freezing non-rails gems

2010-05-31 Thread Adam Ms.
That's the ticket! Thank you. a. -- 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 group, send email

[Rails] Active Directory in Ruby on rails

2010-05-31 Thread Periyasamy Ramachandiran
Hi, I need to create a Active directory authentication on linux machine using ruby on rails. Can anybody have any idea please? Regards, Periyasamy.R -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk