[Rails] Re: ROR performance for milions pageviews/month

2009-04-18 Thread Tom Lobato
possibility, since this decision depends strongly of the research I`m doing now (including your replys). Tom Lobato Chris Kottom escreveu: Hi Tom, Just to fine tune your original question, you're probably most interested in knowing whether or not a Rails equivalent to your curren

[Rails] ROR performance for milions pageviews/month

2009-04-14 Thread Tom Lobato
need to confirm if ror can satisfy the performance demands for this. Can you comment about the ror performance for such a page view scale and/or point to some cases or statistics from existing sites? Thank you, Tom Lobato --~--~-~--~~~---~--~~ You received this

[Rails] Re: Prawn: text at horizontal middle of the page

2009-02-06 Thread Tom Lobato
Solved! I had to use bounding box to position the text. The trick is to use the bounding_box parameters: :width => bounds.width, :height => bounds.height instead :width => 800, :height => 600 now prawn center the text exactly. See all the code... Prawn::Document.generate("Certificado.pdf",

[Rails] Re: Prawn: text at horizontal middle of the page

2009-02-06 Thread Tom Lobato
hen we close this thread, I will copy it digested to the prawn list. Thank you, Tom Lobato --~--~-~--~~~---~--~~ 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 r

[Rails] Prawn: text at horizontal middle of the page

2009-01-06 Thread Tom Lobato
How to achieve this, like a horiz. align to center? I`m trying Prawn to generate PDFs, but having a problem to place a short text (3 words) at the horiz. middle of the page. This code places the text 2 or 3 centimeters right from the middle. Prawn::Document.generate('public/' + dir + "certifica

[Rails] Re: ROXML versus simple to_xml

2009-01-05 Thread Tom Lobato
ok, thank you very much!! I will try it. Anyway, What are the "more general problem" you said? On 5 jan, 19:00, Frederick Cheung wrote: > On 5 Jan 2009, at 20:40, Tom Lobato wrote: > > > > > > > On 5 jan, 18:16, Frederick Cheung wrote: > >> roxm

[Rails] Re: ROXML versus simple to_xml

2009-01-05 Thread Tom Lobato
On 5 jan, 18:16, Frederick Cheung wrote: > roxml is trying to solve a more general problem - if you models aren't   > activerecord models then they are not going to have a particularly   > useful to_xml on it (the time i used it was generated xml to pass to a   > webservice) Sorry my bad engli

[Rails] ROXML versus simple to_xml

2009-01-05 Thread Tom Lobato
How they differ? Does the to_xml method of the classes array/hash/object is based on ROXML lib? As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we define the class (class Book in the guide) before to convert a object to xml. Moreover, the method to_xml (when not using "include RO

[Rails] Re: Including join model data

2009-01-04 Thread Tom Lobato
[:padrinho] = part.padrinho.nome if part.padrinho_id obj[:presenca] = part.presenca @treinandos << obj end If you have any idea about the rails way to do it, please tell me. On 4 jan, 19:37, Tom Lobato wrote: > I`m using the joing model Part to access Treinando from

[Rails] Including join model data

2009-01-04 Thread Tom Lobato
I`m using the joing model Part to access Treinando from Evento. This code works well: @treinandos = Evento.find(params[:evento_id]).treinandos But the parts table has some more columns I need to retrieve addtionally. Even after some docs/googling and tests I was not able to append this infor

[Rails] Re: How to go back to using webrick default server

2008-11-29 Thread Tom Lobato
ve it as default. > > Thanks > you can 'gem remove mongrel' or make a alias if you are using unix: alias "webrick=./script/server webrick" (in last case, add also it to your ~/.profile: echo ' alias "webrick=./script/server webrick" ' >> ~/.profil

[Rails] Generating Class Diagram from Models

2008-11-21 Thread Tom Lobato
files? I say, has_many, belongs_to, etc... Ok, I could use Power Architect to read the tables and make the arrows by hand, but in a constant growing project, it is not a good way. Thank You Tom Lobato --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Generating Class Diagram from Models

2008-11-21 Thread Tom Lobato
Hi all! There are several softwares which read a database and shows the tables graphically on the screen (now I`m using Power Architect: http://www.sqlpower.ca/page/architect). Is there something which beyond to read the tables, can understand the relationship beetween it from app/models files

[Rails] Re: Beyond the simple select

2008-11-20 Thread Tom Lobato
Frederick Cheung escreveu: On 20 Nov 2008, at 13:29, Tom Lobato wrote: How will this ":include" change the json response? Since there is a list being selected, I need to parse it in the client side. I`m not using simple to_json, but to_ext_json (provided by the pl

[Rails] Re: Beyond the simple select

2008-11-20 Thread Tom Lobato
ils/), but I think the "include" won`t change. On Nov 20, 6:49 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Nov 20, 8:02 am, Tom Lobato <[EMAIL PROTECTED]> wrote: > > > I have 3 tables: > > pupils:           id, name, born_date, sex > > cours

[Rails] Beyond the simple select

2008-11-20 Thread Tom Lobato
I have 3 tables: pupils: id, name, born_date, sex courses:id, course_name, description pupilXcourse: pupil_id, course_id Today I run a Pupil.find(:all) and send a json response to the browser, who shows a table of pupils and its attributes. I want to include in this listing on