[Rails] Re: Cucumber + Ajax

2009-12-16 Thread Clemens
the cucumber/webrat visit is not a xhr (ajax) call. You probably need to go with watir or selenium... On 16 Dez., 06:55, Abhishek shukla bettera...@gmail.com wrote: Hello Friends. I have a scenario where I am using link_to_remote For a ajax request. Cucmber Script Then I click on Active

[Rails] Are class variables and class instance variables shared among different requests?

2009-12-16 Thread Vikrant Chaudhary
Hi, I just wanted some clarification on this. In production mode, while I know that object instance variables are local to the object and so to the request, but is this same with class variables and class instance variables or are they shared between requests? I have this question, because I

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread greghauptmann
thanks - so I do want to have the images etc authenticated as well by the way, so this is why I haven't got them under public either... so the two test scenarios are based on doing a save as from a website, and then: (a) saving the web content directly under /public - which runs fast (b) having

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread Arun Srini
http://www.engineyard.com/blog/2009/your-pages-will-load-faster-with-rails/ On Dec 16, 2:19 pm, greghauptmann greg.hauptm...@gmail.com wrote: thanks - so I do want to have the images etc authenticated as well by the way, so this is why I haven't got them under public either... so the two

[Rails] Re: Rails application template divided into sub-templates

2009-12-16 Thread Jakub
But I am writing about templates you use when you are creating NEW APPLICATION by calling rails depot -m template.rb not about view templates. Guess partials don't really help here. On Dec 15, 3:46 pm, Kaid quadfol...@gmail.com wrote: Hello, you've got partial. Try searching rails partial.

Re: [Rails] Re: Rails application template divided into sub-templates

2009-12-16 Thread Kaid Wong
Hi, Jakub. Sorry I didn't read your post carefully :p. On Wed, Dec 16, 2009 at 5:41 PM, Jakub jakub.ho...@gmail.com wrote: But I am writing about templates you use when you are creating NEW APPLICATION by calling rails depot -m template.rb not about view templates. Guess partials don't

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread greghauptmann
Some good points in the link - but I'm thinking it still doesn't address the large fundamental increase in response time when having to go through rails for the authentication etc. In both cases in the comparison for example there was no expires time populated. I'm thinking maybe what i need to

[Rails] Re: rjs replace_html with a partial select box not working

2009-12-16 Thread tonypm
is it that :prompt needs a string ? Tonypm -- 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

[Rails] mysql character set = UTF-8 on a cloumn in a migration

2009-12-16 Thread tonypm
Hi, I want to change a single table field to UTF-8, but cant see a way of defining this in a migration. Does anyone know if there is a way, or if it has to be an sql snippet, how would I add that? Thanks Tony -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Need help...NameError in InteractController#add_to_cart

2009-12-16 Thread Oluwayomi Oluwadara
I am following the text agile web development with railshere is my code, class InteractController ApplicationController  def index   �...@products = Product.find_products_for_sale  enddef add_to_cart  product = Product.find(params[:id])�...@cart = find_cart 

Re: [Rails] Need help...NameError in InteractController#add_to_cart

2009-12-16 Thread Colin Law
2009/12/16 Oluwayomi Oluwadara yomid...@yahoo.com I am following the text agile web development with rails here is my code, There is no point repeatedly posting the same code. As has been pointed out several times the problem is that you are missing the find_cart method. In Agile Development

[Rails] Re: Too many methods in the model? Extra lightweight logic layer?

2009-12-16 Thread Wojciech Kruszewski
P.S. Couple methods you listed seem good candidates to remain in model class. I suspect they are core of business logic and most important actions called in the controller. If there's more than a dozen of them, I'd probably try to make them very short by extracting common parts into utility

[Rails] Re: shear madness

2009-12-16 Thread andkjaer
Trausti and Jemminger - thank you I really never thought about i that way :O) On 16 Dec., 04:55, jemminger jemmin...@gmail.com wrote: On Dec 15, 3:30 pm, Trausti Thor Johannsson traust...@gmail.com wrote: You always miss out on features coming in new versions, so why get started with

[Rails] Re: code coverage tool for manual testing

2009-12-16 Thread Eddy Josafat
I don't know any tool which can do that. I've used Selenium and Watir to test GUI, but they are for automated testing too. On 15 dic, 05:17, pankaj pankajbhage...@gmail.com wrote: @eddy exactly On Dec 15, 7:23 am, Eddy Josafat eddyjosa...@gmail.com wrote: I think rcov is to test code

[Rails] Cookie encoding problem

2009-12-16 Thread Steffo Weber
Gurus, I'm new to the rail stuff and didn't find any answer to this on the net: 1. In RoR I set a cookie to a value like /foo/bar (containing slashes and other special chars) 2. In my bowser I see that the value is actually %2Ffoo%2Fbar (URL encoded) 3. This cookie will be received by an app

[Rails] Twitter rails Plugin

2009-12-16 Thread Jonhy Pear
Do you know any good rails plugin for twitter? Thnaks, -- 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

Re: [Rails] Twitter rails Plugin

2009-12-16 Thread Bruno Grasselli
I am using this one: http://twitter.rubyforge.org 2009/12/16 Jonhy Pear jonhy.p...@gmail.com Do you know any good rails plugin for twitter? Thnaks, -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

Re: [Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread Hassan Schroeder
On Tue, Dec 15, 2009 at 11:13 PM, greghauptmann greg.hauptm...@gmail.com wrote: PS.  On average each request is about 3000ms to 5000ms when being served by RoR (authlogic/paperclip), as opposed to about 160ms for the same content but put directly under /public.  I'm using mongrel. You can get

Re: [Rails] Re: rjs replace_html with a partial select box not working

2009-12-16 Thread Chris Habgood
You can but it works just fine when the page loads up or you refresh the whole page. On Wed, Dec 16, 2009 at 5:50 AM, tonypm tonypmar...@hotmail.com wrote: is it that :prompt needs a string ? Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Need help...NameError in InteractController#add_to_cart

2009-12-16 Thread Oluwayomi Oluwadara
thanks a bunch Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love. --- On Wed, 12/16/09, Colin Law clan...@googlemail.com wrote: From: Colin Law clan...@googlemail.com Subject: Re: [Rails] Need help...NameError

[Rails] Rails documentation generating error

2009-12-16 Thread Mohamed Aslam
Hi, I tried to generate Rails guides locally using following command rake doc:guides but rake aborats denoting following error message. rake aborted! Missing template credits.erb in view path /opt/local/lib/ruby/gems/1.8/ gems/rails-2.3.5/lib/../guides/rails_guides/../source Also I tried to

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread sax
Are you re-checking authentication for each image? Could you find some way to authenticate only once for all of your resources? Perhaps use Basic or Digest authentication for your images, and then somehow tie the password to the current session? If you can remove unnecessary database hits, you may

Re: [Rails] Cucumber + Ajax

2009-12-16 Thread Marcelo M Serpa
I assume you are using Cucumber with webrat. WebRat does not support Ajax, for that, you would need to use Selenium. Check out the Selenium page on the cucumber github wiki for more info. If you need additional help after that, contact me directly and I may be able to help you set it up.

Re: [Rails] Error: uninitialized constant MysqlCompat::MysqlRes

2009-12-16 Thread Wolfravenous
If you are still getting this issue, I have posted an EXPLANATION as well as how to derive the correct solution for your system here http://techliberty.blogspot.com/ http://techliberty.blogspot.com/ the EXPLANATION was to long for a forum post :) Adam Akhtar-2 wrote: Anybody still has

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread greghauptmann
Thanks * I'll try new relic then to get some more incite * re authentication I'm using authlogic so in fact after initial authentication it should use session cookies. However authlogic does store sessions in database.. * re number of images etc and mongrel cluster, I'm only testing with one

[Rails] EDI

2009-12-16 Thread dwhitekiss
Hello, Has any body tried ROR for EDI development? If yes, can I see the resources. If no, where should I start EDI on ROR? D -- 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

Re: [Rails] EDI

2009-12-16 Thread tom
EDI? On Wed, Dec 16, 2009 at 1:42 PM, dwhitekiss dwhitek...@gmail.com wrote: Hello, Has any body tried ROR for EDI development? If yes, can I see the resources. If no, where should I start EDI on ROR? D -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] EDI

2009-12-16 Thread dwhitekiss
Electronic Data Interchange On Thu, Dec 17, 2009 at 2:46 AM, tom tomabr...@gmail.com wrote: EDI? On Wed, Dec 16, 2009 at 1:42 PM, dwhitekiss dwhitek...@gmail.com wrote: Hello, Has any body tried ROR for EDI development? If yes, can I see the resources. If no, where should I start EDI on

Re: [Rails] EDI

2009-12-16 Thread Marcelo M Serpa
+1 EDI? Em Dec 16, 2009, às 12:46 PM, tom escreveu: EDI? On Wed, Dec 16, 2009 at 1:42 PM, dwhitekiss dwhitek...@gmail.com wrote: Hello, Has any body tried ROR for EDI development? If yes, can I see the resources. If no, where should I start EDI on ROR? D -- You received this

Re: [Rails] EDI

2009-12-16 Thread tom
EDI = XML, furhtermoew, each document has a unique number and refined fields...all u need is a mapping and maybe something like to_edi maybe a mapping table... On Wed, Dec 16, 2009 at 1:47 PM, dwhitekiss dwhitek...@gmail.com wrote: Electronic Data Interchange On Thu, Dec 17, 2009 at 2:46

Re: [Rails] EDI

2009-12-16 Thread dwhitekiss
I am an absolute beginner in ROR. How can I start mapping using ROR? On Thu, Dec 17, 2009 at 3:04 AM, tom tomabr...@gmail.com wrote: EDI = XML, furhtermoew, each document has a unique number and refined fields...all u need is a mapping and maybe something like to_edi maybe a mapping table...

Re: [Rails] EDI

2009-12-16 Thread tom
1) do u have an running webapplication in RoR? 2) do u know what EDI is? On Wed, Dec 16, 2009 at 2:07 PM, dwhitekiss dwhitek...@gmail.com wrote: I am an absolute beginner in ROR. How can I start mapping using ROR? On Thu, Dec 17, 2009 at 3:04 AM, tom tomabr...@gmail.com wrote: EDI = XML,

Re: [Rails] EDI

2009-12-16 Thread Marcelo M Serpa
Don't think about ROR, think about Ruby, how can you map with Ruby, then adapt it to ROR. Marcelo. Em Dec 16, 2009, às 1:07 PM, dwhitekiss escreveu: I am an absolute beginner in ROR. How can I start mapping using ROR? On Thu, Dec 17, 2009 at 3:04 AM, tom tomabr...@gmail.com wrote: EDI =

Re: [Rails] EDI

2009-12-16 Thread tom
sure, but the goal is to map lets say a PurchaseOrder (Header + Positions = 2 Models in ActiveRecord (PO_Header + PO_Line)), right? but to to s imple mapping in ruby, yes the first step would be to outline / output in a xml file...would be my route -- You received this message because you are

Re: [Rails] EDI

2009-12-16 Thread bill walton
Hi, On Thu, 2009-12-17 at 03:07 +0800, dwhitekiss wrote: I am an absolute beginner in ROR. How can I start mapping using ROR? Assuming you're beyond the 'how do i build a Rails app' level, and assuming that what you're trying to do is limited to building an xml doc rather than implementing an

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread greghauptmann
tried new relic however it requires silver to do a web transaction view, which seems to be a minimum $100 monthly even if I only want to use it for 10 minutes...I bit expensive for a hobbyist programmer who just wants to get time response time log points in to delineate times spent in: rails

Re: [Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread Hassan Schroeder
On Wed, Dec 16, 2009 at 11:38 AM, greghauptmann greg.hauptm...@gmail.com wrote: tried new relic however it requires silver to do a web transaction view, which seems to be a minimum $100 monthly Mmmm. Haven't been paying attention, apparently their business model has, er, evolved :-)

[Rails] Re: Approaches to improve response times for web pages who's HTML content is loaded through Rails???

2009-12-16 Thread greghauptmann
PS I should say what the free screen did show from a high level point for the call I made was: * average response time broken down by tier * ~40ms Ruby * ~140ms Mongrel wait * ~3ms Database On Dec 17, 5:47 am, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Wed, Dec 16, 2009 at 11:38

Re: [Rails] EDI

2009-12-16 Thread tom
Bill, are u more familiar with EDI? i mean the various protocols / subsets etc? On Wed, Dec 16, 2009 at 2:25 PM, bill walton bwalton...@gmail.com wrote: Hi, On Thu, 2009-12-17 at 03:07 +0800, dwhitekiss wrote: I am an absolute beginner in ROR. How can I start mapping using ROR? Assuming

Re: [Rails] Twitter rails Plugin

2009-12-16 Thread Jonhy Pear
Thank you. Looks good. On Wed, Dec 16, 2009 at 3:20 PM, Bruno Grasselli bruno.grasse...@gmail.comwrote: I am using this one: http://twitter.rubyforge.org 2009/12/16 Jonhy Pear jonhy.p...@gmail.com Do you know any good rails plugin for twitter? Thnaks, -- You received this message

[Rails] Segmenting databases in environments

2009-12-16 Thread mrmanishs
We have two environments, sandbox and production, each with it's own main database. However, production will have a separate database called Users that has login/password information, which would be used by the sandbox or production environments to login. If we set it up in our User model to use

[Rails] Caching comments: timestamps and subdomains

2009-12-16 Thread jhaagmans
Hi, I'm working on a website that has a very slow loading frontpage. I wanted to start by caching certain elements that have high load. For example, it loads the last 50 comments, along with the corresponding usernames, avatars and more. So I cached that fragment and created a sweeper that

[Rails] Re: Caching comments: timestamps and subdomains

2009-12-16 Thread jhaagmans
- When expiring a cached fragment, it sends along the subdomain. This means that when I create a comment atwww.domain.com/comment/create, it will expire the cache forwww.domain.com, but not for domain.com. I don't want it to store two different cached fragments for www and non- www, as

Re: [Rails] Re: Caching comments: timestamps and subdomains

2009-12-16 Thread Agustin Nicolas Viñao Laseras
With the first problem, you can do something like this: In the coment render the datetime when they create, like this: *user1 make a coment 2009-12-16 20:44* and with jquery (if you use jquery) you can transform the datetime to time ago format with this library: http://timeago.yarp.com/ Like

[Rails] Where is the first point in rails code that a request hits?

2009-12-16 Thread greghauptmann
Hi, Where is the first point in rails code that a request hits? (I can then add some logging code there as I want to measure some response times) Regards -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: Single Table Inheritance in Rails: Sample App Available

2009-12-16 Thread Joe McGlynn
Part 3 of the Rails STI post is available now: http://joemcglynn.wordpress.com/2009/12/16/rails-single-table-inheritance-part-iii/ The example source code for part 2 is on github: http://github.com/canonical/Single-Table-Example Cheers, Joe On Dec 12, 4:54 pm, Joe McGlynn

[Rails] observe_field

2009-12-16 Thread INDRANIL MUKHERJEE
I have a select element where the id field of a db table is populated. When I select an id from that select tag I want to show all the related names with that id populated in another select tag element in the same page.please help me. Thanks Regards INDRANIL MUKHERJEE -- You received this

[Rails] Understanding where certain 'inherited' methods come from in ActionController::Base

2009-12-16 Thread Manuca
Hi I just started getting my hands on Rails, I've been reading a good book on the subject but now I want to continue by myself and with the help of the rails api documentation but I find it quite difficult to follow (copared with the Java generated docs for example). One thing that I still can't

[Rails] Re: How to scrape a page without knowing its html structure

2009-12-16 Thread jman
It seems that looking at the structure would be the easiest way, but if you wanted something more complex...your scraping program could infer the layout structure and separate this from the content. Your program would need to be fed multiple pages and would assume the layout to be the portion

[Rails] Barry Flower is out of the office.

2009-12-16 Thread Barry Flower
I will be out of the office starting 17/12/2009 and will not return until 23/12/2009. I will be accessing my mail from time to time but for urgent issues please contact Kiran Joshi (IT Issues) or Adam Brand (Business Issues) or Elaine Chetty (Project, Planning or Finance Issues). For urgent