[Rails] Re: Simulate activity of users?

2010-03-07 Thread Heinz Strunk
If no one knows how to do it better does what would you guys suggest where to put these? Into the model of reports or seperate library/module? -- 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

Re: [Rails] Re: Re: how to obtain the index of selected item from select box?

2010-03-07 Thread Nitin Rajora
Do one thing, give me migrations or the sql dump of your database structure, and your app's directory zip, I will try to replicate the issues you're having and then can assist you further. Because "not able to do the ajax functionality" is a very big scope of a problem, there can be many reasons.

Re: [Rails] Connecting to sessions table in another database

2010-03-07 Thread Conrad Taylor
On Sat, Mar 6, 2010 at 5:55 PM, tispratik wrote: > I have two applications, appA and appB. I want to use single sign on > for both the apps. > Meaning, if a user logs in to appA, he dont have to login to appB and > conversely, if a user logged out of appA, it logs him out of appB too. > Just like

[Rails] Re: Re: how to obtain the index of selected item from select box?

2010-03-07 Thread Veena Jose
> 3. Now we are talking about ReadingsController index action with a list > of > all locations displayed on it in a div with id say - < div > id="reading_list_div" > > You need one more action which will be take one argument as selected > state > and will populate a new list of locations wh

Re: [Rails] Where can I read about f.submit?

2010-03-07 Thread Conrad Taylor
On Sun, Mar 7, 2010 at 10:11 PM, Frank Huster wrote: > Hi, > ror newbie here. > > I guess this is more of a "how do I get information" question than > anything. > > The generator inserts f.submit statements in forms and I'm looking at > the documentation for submit but can't find it anywhere. > I

[Rails] MD5 wrong number of arguments (1 for 0) Error

2010-03-07 Thread Salil Gaikwad
Hi All, I have following error on my Server which is working properly on my local on following line . event_id = MD5.new("event-init-flash-#{Asteroid::now}").to_s #line 232 ERROR: wrong number of arguments (1 for 0) /ruby/gems/gems/shooting_star-3.2.7/bin/../lib/shooting_star/server.rb:232:in `

[Rails] Where can I read about f.submit?

2010-03-07 Thread Frank Huster
Hi, ror newbie here. I guess this is more of a "how do I get information" question than anything. The generator inserts f.submit statements in forms and I'm looking at the documentation for submit but can't find it anywhere. I looked at: -ruby guides, only submit_tag is mentioned -api.rubyonrails

[Rails] Re: Connecting to sessions table in another database

2010-03-07 Thread JeffV
On Mar 6, 5:55 pm, tispratik wrote: > I have two applications, appA and appB. I want to use single sign on > for both the apps. > Meaning, if a user logs in to appA, he dont have to login to appB and > conversely, if a user logged out of appA, it logs him out of appB too. > Just like in google's

[Rails] Dynamically Defined URLs on S3

2010-03-07 Thread Sandy
I realize that S3 buckets do not contain folders, but that they do permit the use of filenames which contain the "/" character, thereby giving the appearance of folders ("pseudofolders"). I want to be able to save files in an S3 bucket, with pseudofolders where the pseudofolders are dynamically as

[Rails] Re: Plugins within plugins

2010-03-07 Thread Daniel Guettler
If I'm not completely mistaken, using "bundler" should solve your problem. You can define dependencies within you gem and bundler will resolve the dependencies for you and install what is needed. This is at least a possibility I wanted to invest for my setup once moved over to Rails 3 On Mar 7, 9:

[Rails] Re: Extending a Model that is in a plugin

2010-03-07 Thread Yanni Mac
Maher Hawash wrote: > I have the same issue. Have you been able to figure it out? > > Thanks, > Maher I moved on to other work after I posted this. I will probably revisit this week. I will let you know what I figure out. There has to be an elegant way to do this. I really just need to lea

Re: [Rails] datatype error in ROR

2010-03-07 Thread mamathahl
Colin, this is in a migration. But I did not understand the last para of your reply. As you have suggested, I will first try it on script/console and den let me try to know where exactly the error is happening. Colin Law-4 wrote: > > On 7 March 2010 00:39, mamathahl wrote: >> >> I have been fa

[Rails] Re: MySQL connection collation

2010-03-07 Thread Leopoldo Agdeppa
just execute ALTER TABLE table_name MODIFY column text CHARACTER SET utf8 this will do the trick Witold Rugowski wrote: > Maurício Linhares wrote: >> Have you looked at this specific table to see it's collation and >> encoding? > Yes, of course: > mysqldump -d --create-options -u root -p DATA

[Rails] Re: Plugins within plugins

2010-03-07 Thread Tristan
I don't have too many plugins so this is still an option. However, I'm eventually going to roll this plugin into a gem and I want to deploy it using a config.gem dependency. Having all the dependencies self- contained would be a huge bonus when it comes to keeping all my apps up to date as I can si

[Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-07 Thread xxdesmus
I tried date_select but I kept getting a bunch of errors. On Mar 7, 3:01 pm, Viorel wrote: > > Hey, you don't happen to know of a simple way of implementing a date > > picker for a field in a form do you? I was hoping to accomplish this > > without needing to track down a plugin for the task. > >

[Rails] Re: Display human readable time

2010-03-07 Thread Joshua Partogi
Hi Simon, You got that right. That is exactly what I am looking for. I should have looked in ActionPack before asking next time. Thanks for your help. Kind regards, On Mar 7, 8:50 pm, "Simon Macneall" wrote: > On Sun, 07 Mar 2010 17:46:40 +0800, Colin Law   > wrote: > > > On 7 March 2010 09:1

[Rails] Re: Plugins within plugins

2010-03-07 Thread Daniel Guettler
What if you simply add the additional plugins to your main application? At least this is what I'm doing... I have 30+ engine plugins which partly depend on each other. So we add whatever is required to the main application. For testing each engine plugin still has to reference all needed plugins bu

[Rails] Plugins within plugins

2010-03-07 Thread Tristan
Hi all I have a plugin which itself needs to load some plugins from its own vendor/plugins directory. I've spent half of this morning Googling about for answers but I haven't found anything suitable yet. I've been looking at adding plugin load paths to the host app's initializer object from init

[Rails] Re: undefined method on web and not in irb

2010-03-07 Thread Michael Rigart
Frederick Cheung wrote: > On Mar 7, 7:56�pm, Michael Rigart wrote: >> > Fred >> >> unfortunately is does >> > > Is Foo defined in multiple places (some editors leave behind backup > copies of files that Rails loads anyway) ? If you stick a breakpoint > in does the Foo object you have look normal

[Rails] Re: undefined method on web and not in irb

2010-03-07 Thread Michael Rigart
Colin Law wrote: > On 7 March 2010 19:42, Michael Rigart wrote: >> run it through the browser. > Foo.bars is not valid as Foo is a class not an instance, or is that > just a typo here? It should be something like > foo = Foo.new > then use foo.bars > > Colin @Colin: yes, sorry for the mistake. I

[Rails] Array of check boxes and html warning

2010-03-07 Thread Colin Law
Hi I am using something like the following code to show an array of checkboxes within a form <% @froglets.each do |froglet| -%> <%= check_box_tag "note[froglet_ids][]", froglet.id %> <%= h froglet.name %> <% end %> These get submitted as an array and all works well, except for the fact that fire

[Rails] Google Analytics and partials

2010-03-07 Thread Craig White
I have been tracking users with Google Analytics via the javascript code in the header of my main template and that works very well. I've come to realize that there are a few places where I have will_paginate and some cascading collections where there are partials that update but the entire page d

Re: [Rails] undefined method on web and not in irb

2010-03-07 Thread Colin Law
On 7 March 2010 19:42, Michael Rigart wrote: > Hi all > > I seem to have a small problem in Rails. Lets say I have a class Foo > with an habtm association to Bar. So Foo has_and_belongs_to Bars en vice > versa. > > Now, when I do lets say > > Foo.new > Foo.bars, I get an undefined method bars for

[Rails] Re: Re: Modelling Question

2010-03-07 Thread Max Williams
I don't think you could do all of this with the standard nested_attributes on the book model, you'd need to write your own setter method. Ultimately you're going to be creating an authoring_role object, and either finding an existing author or creating a new author, and the same for the role.

Re: [Rails] Upgrading rails project - version 1.2.6 to current (2.3.5)

2010-03-07 Thread Rick DeNatale
On Sun, Mar 7, 2010 at 3:23 PM, Paul Jonathan Thompson wrote: > Can anyone please advise me what is involved in up grading a project > from version 1.2.6 to current (2.3.5). The project is pretty much > vanilla code and does not use plugins. Are there scripts that can do > the job (or pull out inc

Re: [Rails] Re: Database push/pull

2010-03-07 Thread Hassan Schroeder
On Sun, Mar 7, 2010 at 12:29 PM, DanC wrote: > The databases both exist on the same server but one is mysql and one > is postgresql. > > It is not clear to me how to implement this though? I'm sure there's more than one way, but here's a suggestion. You have a User now class User < ActiveReco

Re: [Rails] Re: Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Hassan Schroeder
On Sun, Mar 7, 2010 at 10:18 AM, Allan Last wrote: > I'm expecting the XML information seen here on Firefox: / > to be displayed when I parse the MLB file. Hpricot is not parsing this > file. Sure it is -- use irb to examine what's in @page1. As Frederick already suggested, you apparently have

[Rails] Solved: fastercsv and associated records

2010-03-07 Thread harm
> When filling an id column like that you should probably be passing an > id rather than a Provider object (although :provider => > Provider.find_by_name(...) should be ok). > Sounds like you should break this down into smaller steps so that you > see where it is going wrong (eg so that you can che

[Rails] Re: Database push/pull

2010-03-07 Thread DanC
Hey Hassan, Thanks for the pointer, I have been looking at the API and the establish_connection seems like the way to go. ActiveRecord::Base.establish_connection( :adapter => "mysql", :host => "localhost", :username => "myuser", :password => "mypass", :database => "some

[Rails] Upgrading rails project - version 1.2.6 to current (2.3.5)

2010-03-07 Thread Paul Jonathan Thompson
Can anyone please advise me what is involved in up grading a project from version 1.2.6 to current (2.3.5). The project is pretty much vanilla code and does not use plugins. Are there scripts that can do the job (or pull out incompatibilities). Any websites or blogs that point the way or should I j

[Rails] Re: undefined method on web and not in irb

2010-03-07 Thread Frederick Cheung
On Mar 7, 7:56 pm, Michael Rigart wrote: > Frederick Cheung wrote: > > On Mar 7, 7:42 pm, Michael Rigart wrote: > >> run it through the browser. > > >> Now, when I do it through irb, it returns an empty array as expected. > >> Does someone here has any clue how this can happen and what I need t

[Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-07 Thread Viorel
> Hey, you don't happen to know of a simple way of implementing a date > picker for a field in a form do you? I was hoping to accomplish this > without needing to track down a plugin for the task. > > On a related note: how can I set the default value of a field to be > today's date (just the dat

[Rails] Re: namespaced controller question

2010-03-07 Thread Phillip Koebbe
Frederick Cheung wrote: > On Mar 7, 3:57�am, Phillip Koebbe wrote: >> picked it up. However, for reasons I don't want to go into detail about, >> I moved the utility controller into a namespace (Web), and the route >> started failing. Ultimately, I added >> > > The only thing I've noticed with na

[Rails] Re: undefined method on web and not in irb

2010-03-07 Thread Michael Rigart
Frederick Cheung wrote: > On Mar 7, 7:42�pm, Michael Rigart wrote: >> run it through the browser. >> >> Now, when I do it through irb, it returns an empty array as expected. >> Does someone here has any clue how this can happen and what I need to >> look for, becouse I'm completely clueless. >> >

[Rails] Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Frederick Cheung
On Mar 7, 6:18 pm, Allan Last wrote: > I'm expecting the XML information seen here on > Firefox:http://picasaweb.google.com/lh/photo/X7VFocR3L4S4Pl_2jvDzVQ?feat=dire... > > to be displayed when I parse the MLB file. Hpricot is not parsing this > file. > Have you tried viewing the source of the pa

[Rails] where to put helper fns for fixtures?

2010-03-07 Thread Fearless Fool
I'm writing a fixture in test/fixtures/parrots_model.yml, and I'm happily using ERB to flesh out my fixture. Suddenly, I realize that I need a helper function to call from my erb code, such as: polly: subtype: parakeet weight_kg: <%= ounces_to_kg(22.3) %> alex: subtype: african gray weig

[Rails] Re: undefined method on web and not in irb

2010-03-07 Thread Frederick Cheung
On Mar 7, 7:42 pm, Michael Rigart wrote: > Hi all > > I seem to have a small problem in Rails. Lets say I have a class Foo > with an habtm association to Bar. So Foo has_and_belongs_to Bars en vice > versa. > > Now, when I do lets say > > Foo.new > Foo.bars, I get an undefined method bars for #

[Rails] rails code coverage

2010-03-07 Thread ely
Hello, I would like to know if there is any tool that can show code coverage when the application is running. (like "cover" in Erlang) Thanks -- 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

[Rails] Re: Fixnum problem

2010-03-07 Thread Frederick Cheung
On Mar 7, 7:15 pm, Manish Belsare wrote: > Sir i have now tried to declare a same method twice with a different > name but the same parameter to both the methods.. > Bt i still get that fixnum problem.. > i want to know that calling two different name methods in on Model file > works.? > how to

Re: [Rails] Re: Fixnum problem

2010-03-07 Thread Josh Cheek
On Sun, Mar 7, 2010 at 1:15 PM, Manish Belsare wrote: > Sir i have now tried to declare a same method twice with a different > name but the same parameter to both the methods.. > Bt i still get that fixnum problem.. > i want to know that calling two different name methods in on Model file > works

[Rails] Re: Better way to concatenate options to collection_select?

2010-03-07 Thread Frederick Cheung
On Mar 7, 6:41 pm, Jack o'Shanter wrote: > # View > <%= collection_select :thread, 'forum_id', @forums, :id, :name %> > > Just wondering if there's a more natural (and undocumented) way of doing > it... In a small experiment, collection_select :thread, 'forum_id', @forums, :id, :name, :prompt

[Rails] undefined method on web and not in irb

2010-03-07 Thread Michael Rigart
Hi all I seem to have a small problem in Rails. Lets say I have a class Foo with an habtm association to Bar. So Foo has_and_belongs_to Bars en vice versa. Now, when I do lets say Foo.new Foo.bars, I get an undefined method bars for # when I run it through the browser. Now, when I do it through

[Rails] Re: Fixnum problem

2010-03-07 Thread Manish Belsare
Sir i have now tried to declare a same method twice with a different name but the same parameter to both the methods.. Bt i still get that fixnum problem.. i want to know that calling two different name methods in on Model file works.? how to resolve that error? -- Posted via http://www.ruby-for

[Rails] Re: Fixnum problem

2010-03-07 Thread Jack o'Shanter
Manish Belsare wrote: > Sir can i know what is the meaning of the phrase 'comparison of Fixnum > with nil failed' > > I want to pass two parameters to a method in a model file.. > bt wen i pass an integer then it gives the above error.. > Please help.. Sounds like an Enumerable error. $ irb [nil

Re: [Rails] Fixnum problem

2010-03-07 Thread Josh Cheek
On Sun, Mar 7, 2010 at 12:04 PM, Manish Belsare wrote: > Sir can i know what is the meaning of the phrase 'comparison of Fixnum > with nil failed' > > I want to pass two parameters to a method in a model file.. > bt wen i pass an integer then it gives the above error.. > Please help..

Re: [Rails] Re: Modelling Question

2010-03-07 Thread Anthony Gardner
Sorry for the delay in getting back on this but I've just got back from a weekend away. Okay, so Max, you and I agree on the modelling for this concept so that starts to narrow down where my problem is. To begin with, I thought my problem was because I had a join model acting as the parent to ano

[Rails] Better way to concatenate options to collection_select?

2010-03-07 Thread Jack o'Shanter
I've just been through 4 pages of similar threads, but nothing quite satisfying. What I'm trying to achieve: Please select ALL Forum 1 Forum 2 ... The way I'm currently doing it: # Plugin class FakeModel def initialize(hash) @hash = hash end def id @hash[:id] end

[Rails] Re: Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Allan Last
Hi Hassan, This picture: http://picasaweb.google.com/lh/photo/Qf4DFta9p5ERoCRb6Lbd2Q?feat=directlink This is the parsed output from the feed from the sportingnews XML file. It is displayed on my view with <%= @page1 %>. This picture: http://picasaweb.google.com/lh/photo/xLVr8_U-x12rJnADs_qcEw?f

[Rails] Re: Displaying Nested Objects

2010-03-07 Thread ObjectEvolution
Perfect...thanks! On Mar 7, 4:02 am, Michael Pavling wrote: > On 7 March 2010 00:26, ObjectEvolution wrote: > > >                <% c.thing2.each do |be| %> > >                         > >                                 > >                                       <%=h be.workout_type %> > >      

[Rails] Fixnum problem

2010-03-07 Thread Manish Belsare
Sir can i know what is the meaning of the phrase 'comparison of Fixnum with nil failed' I want to pass two parameters to a method in a model file.. bt wen i pass an integer then it gives the above error.. Please help.. -- Posted via http://www.ruby-forum.com/. -- You received this message becau

Re: [Rails] Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Hassan Schroeder
On Sun, Mar 7, 2010 at 9:39 AM, Allan Last wrote: > If you give my code a quick try, you'll notice that it will read other > XML files, but not the MLB XML. Actually, I already did, and it seems to work just fine. Hence my own head-scratching. :-) So, again, maybe you can say *exactly* what yo

[Rails] Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Allan Last
Hpricot is not parsing the MLB xml file. I'm thinking the reason that it is not reading the MLB xml file is because it is not in a standard XML format. If you give my code a quick try, you'll notice that it will read other XML files, but not the MLB XML. #This works and outputs the proper xml

Re: [Rails] Parsing XML file with no style info with Hpricot

2010-03-07 Thread Hassan Schroeder
On Sun, Mar 7, 2010 at 4:10 AM, Allan Last wrote: > #This does not work, and I'm scratching my head And I'm scratching mine trying to guess what you mean by "does not work" ... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -- You received this messa

Re: [Rails] Re: Mocha expectation is affecting (bleeding) from one test to another

2010-03-07 Thread James Mead
Are you sure no expectations are being set for the failing test e.g. in a setup method? What version of Ruby are you using? What version of Mocha are you using. How and where are you requiring Mocha? Can you send the test code and the code under test to the Mocha mailing list [1] so we can try an

[Rails] Re: Parsing XML file with no style info with Hpricot

2010-03-07 Thread Allan Last
Any idea how to parse this XML? -A Allan Last wrote: > Hello, > > I've been trying for hours to parse an XML using Hpricot. Usually it's > not a problem. Here's my simple code: > > #This works and outputs the proper xml data > @url1 = 'http://www.sportingnews.com/stories/sportingnews/MLB/rss.xm

[Rails] Re: namespaced controller question

2010-03-07 Thread Frederick Cheung
On Mar 7, 3:57 am, Phillip Koebbe wrote: > I have a utility controller that has an action in it. Before I changed > to namespaced controllers, I could access the action with: > > /utility/my_action > > There are no resources associated with the controller, so I'm assuming > the stock route > > m

[Rails] Re: fastercsv and associated records

2010-03-07 Thread Frederick Cheung
On Mar 6, 9:12 pm, harm <176...@googlemail.com> wrote: > On Mar 6, 6:00 pm, Frederick Cheung > wrote: > > > Actually I need to fill the column "provider_id"  in the table "rates" > with the associated key-id from the table "provider"! > > When I do something like: > >       Rate.find_or_create_

[Rails] Re: ActiveRecord: Calculate maximum of calculated column

2010-03-07 Thread Frederick Cheung
On Mar 7, 9:45 am, Max Mustermann wrote: > Hi there, > # start > def max >   maximum(consumption) > end > # end > The activerecord maximum function maps straight to a sql MAX(), so can't work on a calculated column like this. In general, unless you are willing to load all the corresponding rub

Re: [Rails] Database push/pull

2010-03-07 Thread Hassan Schroeder
On Sun, Mar 7, 2010 at 7:35 AM, DanC wrote: > I have two apps which are independent but I now would like to help > them talk to each other. Specifically I would like to allow users > registering to one site to be able to have an account created at the > other automatically. > > Both sites use Res

[Rails] where do you put helper functions for fixture generation?

2010-03-07 Thread fearless_fool
I'm writing a fixture in test/fixtures/parrots_model.yml, and I'm happily using ERB to flesh out my fixture. Suddenly, I realize that I need a helper function to call from my erb code, such as: polly: subtype: parakeet weight_kg: <%= ounces_to_kg(22.3) %> alex: subtype: african gray weig

[Rails] [Newbie] ActiveRecord: Calculate maximum of calculated column

2010-03-07 Thread Max Mustermann
Hi there, I recently started learning Ruby on Rails. I decided to learn Rails by programming some kind of small statistic application where I can document the fuel consumption of my car - i.e. everytime I'm at the gas station I log price and amount of the gas refuled and the distance travelled sin

[Rails] render :inline in ActionMailer

2010-03-07 Thread Thilo-Alexander Ginkel
Hello everyone, while attempting to figure out how to render an inline template as body of a mail message in an ActionMailer I am somewhat lost and hope that somebody on the list can point me into the right direction. My current code looks like this (with minor deletions to improve readability)

[Rails] Database push/pull

2010-03-07 Thread DanC
Hi, I have two apps which are independent but I now would like to help them talk to each other. Specifically I would like to allow users registering to one site to be able to have an account created at the other automatically. Both sites use Restful_authentication plugin so the User table is the

Re: [Rails] How to process collection_select in controller?

2010-03-07 Thread Thilo-Alexander Ginkel
Hello Gael, On Tuesday 02 March 2010 10:35:26 Gael Muller wrote: > In my opinion, there is nothing wrong with your piece of code. Are you > sure you have a reg_template_id column in your table ? Could you show > us the migration for the Event class ? sorry for the delayed response - some unexpect

[Rails] From PHP -> ROR hosting, hosting customers mailboxes and managing server while migrating to all good Ruby On Rails

2010-03-07 Thread rubybox
Would like to ask some advice from you experts on php -> ror hosting migration. Could you guys advice me on this? The memory costs on my regular php server to run ROR are way to high for me Think this could be an interesting topic for many php developers who want to migrate from php to ruby on rail

[Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-07 Thread xxdesmus
Not having any luck with Calendar Date Select so far ... got it installed, but it looks like the documentation is out of date @ http://www.railslodge.com/plugins/46-calendar-date-select ...I can't for the life of me get the pop-up or embedded calendar to display ...let alone get either to display

[Rails] Re: Re: Re: form_for, submit, and parameters disappearing

2010-03-07 Thread Ralph Shnelvar
Colin Law wrote: > On 7 March 2010 11:00, Ralph Shnelvar wrote: >> form_for cannot be, uh, "internationalized" because the various flavors >> 'connected_to_country'), >> � >> >> Both parameters (locale, somename) will end up in the params received by >> the relevant controller. >> >> - - - >> >> I

[Rails] Re: Three submits, one controller

2010-03-07 Thread Neil Bye
Paul Lynch wrote: > You can also just add another public method to the controller. For > instance, instead of using StoryController.update for updating the > comments, you could use something like StoryController.add_comment. How does the submit know which one to use? -- Posted via http:/

[Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-07 Thread xxdesmus
Thank you so much for all your help! On Mar 5, 2:44 pm, Michael Pavling wrote: > On 5 March 2010 17:02, xxdesmus wrote: > > > So I have a bunch of form fields that I need to add up their > > values, and make sure their sum does not except the value entered in a > > new form field. If the sum doe

Re: [Rails] Re: Re: form_for, submit, and parameters disappearing

2010-03-07 Thread Colin Law
On 7 March 2010 11:00, Ralph Shnelvar wrote: > Colin Law wrote: >> I think maybe you cannot include query terms in form_for :url.  An >> alternative is to use hidden fields in the form. > > Colin, thank you.   You appear to be correct. > > So for the next poor person fighting to get internationali

[Rails] Re: Wits end..."cross-thread violation on rb_gc()"

2010-03-07 Thread Jean Nibee
Trying to revive this topic in the hope of getting some resolution to this issue. I would be willing to try anything at this point as my Rails environment is utterly useless right now. Note: It's very possible with all the 'fixes' I"ve tried that the system is just in a weird state so I'd even

[Rails] Re: SWFUpload - IE 8 - prototype.js - give "Object doesn't support this property or method"

2010-03-07 Thread Vincent P
Ah! I found the solution. Just the process of typing up the questions here can be very helpful. I changed the version number ('jquery','1.3.2'); to 1.4 , the latest. Now the browse button works. There is still one error loading prototype.js (below). But it's not fatal. Message: Object doesn

[Rails] Re: Mocha expectation is affecting (bleeding) from one test to another

2010-03-07 Thread Ritchie
I realise this probably won't help you directly because you state that you're not using shoulda but I had a similar problem with mocha stubs bleeding from one Shoulda test to another. I found that reversing the order of the config.gem lines in environment.rb, thus: config.gem "thoughtbot-should

[Rails] Re: SWFUpload - IE 8 - prototype.js - give "Object doesn't support this property or method"

2010-03-07 Thread Vincent P
Here is my js view: http://pastie.org/858075 . The debugger stops at line 31 : google.load('jquery','1.3.2'); After I added at line 37 jQuery.noConflict(); , Firefox and Safari also stop working. If I remove line 37, those browsers work but IE never works regardless. And here is where the err

[Rails] Parsing XML file with no style info with Hpricot

2010-03-07 Thread Allan Last
Hello, I've been trying for hours to parse an XML using Hpricot. Usually it's not a problem. Here's my simple code: #This works and outputs the proper xml data @url1 = 'http://www.sportingnews.com/stories/sportingnews/MLB/rss.xml' @page1 = Hpricot(open(@url1)) <%= @page 1 %> #This does not work,

[Rails] Re: namespaced controller question

2010-03-07 Thread Phillip Koebbe
Craig White wrote: > On Sun, 2010-03-07 at 04:57 +0100, Phillip Koebbe wrote: >> picked it up. However, for reasons I don't want to go into detail about, >> >> work? > > assuming that the first line of > app/controllers/web/utility_controller.rb looks like > > class Web::UtilityController <

Re: [Rails] Displaying Nested Objects

2010-03-07 Thread Michael Pavling
On 7 March 2010 00:26, ObjectEvolution wrote: >                <% c.thing2.each do |be| %> >                         >                                 >                                       <%=h be.workout_type %> >                                       <%=h be.thing3.name %> >                  

[Rails] Re: SWFUpload - IE 8 - prototype.js - give "Object doesn't support this property or method"

2010-03-07 Thread Vincent P
I meant the instructions at http://docs.jquery.com/Using_jQuery_with_Other_Libraries did not help On Mar 7, 3:51 am, Vincent P wrote: > I followed the instructions here to call  jQuery.noConflict(); > but that did not help. > > On Mar 7, 2:39 am, Vincent P wrote: > > > > > In Internet Explorer

[Rails] Re: SWFUpload - IE 8 - prototype.js - give "Object doesn't support this property or method"

2010-03-07 Thread Vincent P
I followed the instructions here to call jQuery.noConflict(); but that did not help. On Mar 7, 2:39 am, Vincent P wrote: > In Internet Explorer 8, I am getting the following error "Object > doesn't support this property or method" at line 4821 of > prototype.js.  The debugger stops at this line:

[Rails] Re: Re: form_for, submit, and parameters disappearing

2010-03-07 Thread Ralph Shnelvar
Colin Law wrote: > I think maybe you cannot include query terms in form_for :url. An > alternative is to use hidden fields in the form. Colin, thank you. You appear to be correct. So for the next poor person fighting to get internationalization to work (I18n. See http://guides.rubyonrails.org

[Rails] SWFUpload - IE 8 - prototype.js - give "Object doesn't support this property or method"

2010-03-07 Thread Vincent P
In Internet Explorer 8, I am getting the following error "Object doesn't support this property or method" at line 4821 of prototype.js. The debugger stops at this line: var nodes = $ (element).getElementsByTagName('*'); The page contains a Browse button from SWFUpload. It works fine in Firefox

[Rails] Re: t0_r0 from include, is it bad?

2010-03-07 Thread Fernando Perez
> It's completely normal. It's how Active Record doing some bookkeeping > to find with :include. Thanks. -- 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 rubyo

Re: [Rails] Display human readable time

2010-03-07 Thread Simon Macneall
On Sun, 07 Mar 2010 17:46:40 +0800, Colin Law wrote: On 7 March 2010 09:19, Joshua Partogi wrote: Hi everyone. Does anybody know a good plugin for displaying a human readable time. I like the ones on github. Django also has this built in, but I can not find it for rails. Can anybody tell m

Re: [Rails] Display human readable time

2010-03-07 Thread Colin Law
On 7 March 2010 09:19, Joshua Partogi wrote: > Hi everyone. > > Does anybody know a good plugin for displaying a human readable time. > I like the ones on github. Django also has this built in, but I can > not find it for rails. Can anybody tell me a good plugin for this? Could you be a bit more

Re: [Rails] datatype error in ROR

2010-03-07 Thread Colin Law
On 7 March 2010 00:39, mamathahl wrote: > > I have been facing some problem with the datatypes.  I have a sample of code > as follows. > >  t.lat_rad = (l.lat * BigDecimal.new("3.1415926536 / 180")).to_f >   t.lng_rad = (l.lng * BigDecimal.new("3.1415926536 / 180")).to_f > > Initially, the datatyp

[Rails] Display human readable time

2010-03-07 Thread Joshua Partogi
Hi everyone. Does anybody know a good plugin for displaying a human readable time. I like the ones on github. Django also has this built in, but I can not find it for rails. Can anybody tell me a good plugin for this? Thank you for your help. Kind regards, -- http://twitter.com/scrum8 -- Yo

[Rails] Using i18n to translate a full page

2010-03-07 Thread harish_reddy
Hi All, The only way that I can think of, to translate a full page is to use locale files as below but it seems impractical and incorrect to include huge chunks of static content in locale files. Could someone suggest a better way of translation pages with static content. _

[Rails] Displaying Nested Objects

2010-03-07 Thread ObjectEvolution
Hi, I've got a question regarding my models in my Rails app. Let's say I have an object: User which has_many: Thing1 and Thing1 has_many: Thing2 and Thing2 has_one: Thing3 When I go to display this in my template, like this: Title Date

Re: [Rails] Re: has anybody made actionmailer work with rails 2.3.5?

2010-03-07 Thread shyam mohan
see this http://www.youtube.com/watch?v=iJZ8w5o_TkE may be u get some idea Regards, Shyam +91-9716-18-9650 On Sat, Mar 6, 2010 at 12:37 AM, Phillip Koebbe wrote: > > > On Mar 5, 12:14 pm, Bigos wrote: > > I have managed to make it work. After changing config/environments/ > > development.rb t

Re: [Rails] datatype error in ROR

2010-03-07 Thread mamathahl
I had actually executed the command dpkg -s ruby It had given me the version as 4.2 When I did a ruby -v, it gave me the version as 1.8.7 l.lat will have some value such as 40.755970 l.lng will have some value such as -73.986702 But since they have been declared as Decimal(15,10), their values w

[Rails] Re: Collection_select with has_one association

2010-03-07 Thread Ugis Ozols
Hello, In your shop view change collection line to: <%= f.collection_select(:city_id, City.find(:all), :id, :name, options ={:prompt => "-Select a city"}, :class =>"") %> On Mar 7, 9:13 am, Greg Ma wrote: > Hi, > I try to create a select menu with all the city available in my shop > form. I've

[Rails] Re: Simulate activity of users?

2010-03-07 Thread Heinz Strunk
No one? -- 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 to rubyonrails-talk+uns