[Rails] Re: Rack::Bug for Rails 2.2.1

2011-07-10 Thread cipher_neo
anoyone? On Jul 7, 9:09 am, cipher_neo l33...@gmail.com wrote: Rack::Bug (https://github.com/brynary/rack-bug) is a tool for profiling rails apps to find bottlenecks in the code. It has a really nice HTML interface that you can access on the production server. The problem is that I am

[Rails] form validation

2011-07-10 Thread Amrit Pal Pathak
I am using rails 3.0.7.i validate a field in form by inserting following line in model class Post ActiveRecord::Base validates_presence_of :title end But i didn't work.Is there any syntax change in rails 3.0.7? Thanks amritpalpathak.blogspot.com -- You received this

Re: [Rails] Re: Best way for social networking in rails

2011-07-10 Thread Branko Vukelic
On Sun, Jul 10, 2011 at 1:19 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Jul 9, 2011 at 3:59 PM, Jarin Udom jarin.u...@gmail.com wrote: ... but it always kind of bums me out to see these how do I build a complex application posts. So, this space shuttle deal -- is there,

Re: [Rails] Re: Best way for social networking in rails

2011-07-10 Thread Branko Vukelic
On Sun, Jul 10, 2011 at 12:59 AM, Jarin Udom jarin.u...@gmail.com wrote: I'm obviously making a lot of assumptions here, but I've heard it's pretty common for developers in India to be herded through diploma mill tech schools and then realize after they get hired that they actually don't know

[Rails] Best server for rails 3

2011-07-10 Thread jude
which will be the best web server and app server for rails 3 -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: Zip files on Amazon s3 bucket

2011-07-10 Thread Frederick Cheung
On Jul 9, 5:59 pm, johnnybutler7 johnnybutl...@gmail.com wrote: Ive recently moved my files to amazon S3 storage.  There is some functionality to allow an archive of files to be downloaded to a user via delayed job. So basically a project may have 10 documents in 10 different folders in the

Re: [Rails] form validation

2011-07-10 Thread Michael Pavling
On 10 July 2011 08:20, Amrit Pal Pathak amritpalpath...@gmail.com wrote: I am using rails 3.0.7.i validate a field in form by inserting following line in model class Post ActiveRecord::Base validates_presence_of :title end                     But i didn't work.Is there any syntax change in

Re: [Rails] form validation

2011-07-10 Thread Dheeraj Kumar
As the question is improper, I feel like providing an improper answer. ...it works for me. On Sun, Jul 10, 2011 at 2:15 PM, Michael Pavling pavl...@gmail.com wrote: On 10 July 2011 08:20, Amrit Pal Pathak amritpalpath...@gmail.com wrote: I am using rails 3.0.7.i validate a field in form by

[Rails] Enterprise menu - yet another try on creating internal DSL for defining menus - easy of course!

2011-07-10 Thread drKreso
Hi guys, I've created 'emenu' gem that is supposed to take of burned of maintaining and tweaking menu layout https://rubygems.org/gems/emenu. It's main purpose is usage in larger projects or admin pages that have a lot of options and a lot of rules regarding who gets to see what. It is really

[Rails] Re: Best server for rails 3

2011-07-10 Thread drKreso
I don't know about the best, but I have decent experiences with NginX Passenger. I can send you some config files if you would like to take a look at it. I did try with Thin for app server, but it Passenger does the heavy lifting for you so it's much more pleasant... Best Regards, Kresimir

Re: [Rails] Re: Best server for rails 3

2011-07-10 Thread Dheeraj Kumar
You might also try nginx + thin, varnish caching the pages, and perhaps HAProxy for load balancing. On Sun, Jul 10, 2011 at 4:09 PM, drKreso kresimir.boj...@gmail.com wrote: I don't know about the best, but I have decent experiences with NginX Passenger. I can send you some config files if

[Rails] Re: Zip files on Amazon s3 bucket

2011-07-10 Thread johnnybutler7
Thought so :( thanks for your reply. On Jul 10, 9:23 am, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 9, 5:59 pm, johnnybutler7 johnnybutl...@gmail.com wrote: Ive recently moved my files to amazon S3 storage.  There is some functionality to allow an archive of files to be

[Rails] Preventing serialization of attributes in the model

2011-07-10 Thread jhaagmans
Hi, I'd like to get your thoughts on something. We're developing an application that relies heavily RESTful JSON requests. Because I want to keep the code as clean as possible, I want to be able to return the JSON for a user using @user.to_json. Which works fine, but it also includes the

Re: [Rails] Preventing serialization of attributes in the model

2011-07-10 Thread Everaldo Gomes
Hi! I think you could use inheritance to extend ActiveRecord::Base and then you could overwrite the to_json method. There you could write the rules for default excluded column names. Then, your Models should extend your inherited class. I don't know if this work, it's just an idea. Best

[Rails] is there any Time function to gat a duration from string ?

2011-07-10 Thread Erwin
I get a string back from ffmpeg : 00:00:03.10( hh:mm:ss ) which class should I use to get it converted into 3.10 sec ( float) thanks for your feedback -- 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: is there any Time function to gat a duration from string ?

2011-07-10 Thread Erwin
I tried : output = 00:00:03.10 output.split(':').inject(0){|a, m| a = a * 60 + m.to_f} = 3.1 is there any better way ? On Jul 10, 5:37 pm, Erwin yves_duf...@mac.com wrote: I get a string back from ffmpeg :  00:00:03.10    ( hh:mm:ss ) which class should I use to get it converted into  3.10

Re: [Rails] Preventing serialization of attributes in the model

2011-07-10 Thread Peter De Berdt
Overwriting the as_json method in your model should work too I think. Best way to to it IMO if it's just one model you want to change the to_json behavior on. def as_json(options={}) options[:except] ||= [:some, :fields, :here] super(options) end On 10 Jul 2011, at 17:35, Everaldo Gomes

Re: [Rails] Preventing serialization of attributes in the model

2011-07-10 Thread Everaldo Gomes
I liked the Peter's suggestion. And I found this link in google, because I was curious about the as_json method: http://jonathanjulian.com/2010/04/rails-to_json-or-as_json/ Best Regards, Everaldo On Sun, Jul 10, 2011 at 1:37 PM, Peter De Berdt peter.de.be...@pandora.bewrote: Overwriting the

[Rails] Rails 3.1 RSpec: Puzzled by template rendering failures

2011-07-10 Thread Leigh Daniels
Hi All, I'm starting a Rails 3.1 app. Two tests which involve invalid models are failing and I don't understand why. The tests are the stock tests generated by the rails rspec generator. I'm new to RSpec so I'm probably missing something obvious. I'd appreciate some guidance. **Leigh

[Rails] Columnize text?

2011-07-10 Thread sdwrage
Hey all, I have been working on a project that would need text to be columnized (2 to be exact) and converted to PDF format. The only problem is, I can't get column-count, column-size, etc to work with wicked_pdf. Is there possibly another solution of programmatically columnizing (either through

[Rails] need help for formating timestamp on round trip: db - browser - db

2011-07-10 Thread mkristian
I have a date in the sqlite3 database which gives me trouble sqlite select * from accounts; 3|myname|2011-07-10 13:47:26.055000|2011-07-10 13:47:26.055000 putting it into html via the hidden_field.tag like this %= f.hidden_field :updated_at % here f comes from %= form_for(@account) do

[Rails] Re: Chat client In rails

2011-07-10 Thread frankblizzard
yep, I also realized one with Faye follwing the railscast messagin with faye was straight forward and works well also you want obviously do the necessary tom improve the user experience a little. On Jul 9, 5:11 pm, Stefano stefano@gmail.com wrote: Probably the easiest (yes I know that might

Re: [Rails] Rails 3.1 RSpec: Puzzled by template rendering failures

2011-07-10 Thread Conrad Taylor
On Sun, Jul 10, 2011 at 10:33 AM, Leigh Daniels leighdaniel...@gmail.comwrote: Hi All, I'm starting a Rails 3.1 app. Two tests which involve invalid models are failing and I don't understand why. The tests are the stock tests generated by the rails rspec generator. I'm new to RSpec so I'm

Re(2): [Rails] Rails 3.1 RSpec: Puzzled by template rendering failures

2011-07-10 Thread Leigh Daniels
Thanks, Conrad. I'm all green now! **Leigh On Sun, Jul 10, 2011, Conrad Taylor conra...@gmail.com wrote: Leigh, you're controller spec appear to be missing a call to the following: render_views Thus, you'll need to add this line inside the first describe block of the jobs_controller_spec.rb.

[Rails] Duplicate Record Detection

2011-07-10 Thread Justin Stanczak
How are others doing duplicate record detection? I'm not finding very many solutions, or methods online. I found one called SimString, but not much else. I was wondering how others are detecting duplicates. Similar to suggested items, I would like to show records that may match or have similar

[Rails] Re: Question on memory usage, garbage collector, 'top' stats on linux

2011-07-10 Thread Andrew Skegg
DK dk.kahn@... writes: As far as cached, I see in top: Mem:   3994516k total,  3830048k used,   164468k free,   119540k buffers Swap:   905208k total,        0k used,   905208k free,  3207936k cached Being simplistic, I would not worry about it unless the swap file is actually being

[Rails] Re: Best way for social networking in rails

2011-07-10 Thread gezope
Hello Hassan, good question. I found 4 ways when I tried: 1. EngineY - Seems exactly for this goal but I dunno much. 2. LovdByLess - it's fancy but not upgraded yet. You might wanna upgrade it yourself )I tried, writing a new one is easier for sure). 3. Insoshi https://github.com/gezope/insoshi

Re: [Rails] Re: Best way for social networking in rails

2011-07-10 Thread Hassan Schroeder
On Sun, Jul 10, 2011 at 5:53 PM, gezope gez...@gmail.com wrote: Hello Hassan, good question. Erm, thanks, but it wasn't my question. At the moment I'd much prefer seppuku to trying to implement YASN, in any form. :-) -- Hassan Schroeder hassan.schroe...@gmail.com

Re: [Rails] Re: Best way for social networking in rails

2011-07-10 Thread Branko Vukelic
On Mon, Jul 11, 2011 at 3:17 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: Erm, thanks, but it wasn't my question. At the moment I'd much prefer seppuku to trying to implement YASN, in any form. :-) I don't know which is more pointless in 21st century, YASN or CMS. But hey, even

[Rails] Re: RoR view question: pre-selecting radio box

2011-07-10 Thread Andrew Skegg
aj airjaw@... writes: I have the radio buttons, the images, and the comment field set up. I'm not sure how to pre-select one of the images and wire it to transmit a value. Old(ish), but relevant. http://railscasts.com/episodes/52-update-through- checkboxes -- You received this message

[Rails] Re: is there any Time function to gat a duration from string ?

2011-07-10 Thread AGoofin
You could convert the string to a time object and pick out the specific parts you want. This might come in handy if you want to store the time in the database at some point. http://api.rubyonrails.org/classes/Time.html On Jul 10, 11:47 am, Erwin yves_duf...@mac.com wrote: I tried : output =

[Rails] How to Install ruby 1.9.2/1.9.1 and Rails 3.x on Ubuntu

2011-07-10 Thread Emeka
Hello All, I have Ubuntu 11-04, I would want to install ruby 1.9.2/1.9.1 and Rails 3.x. I need the least complicated way of doing this. Rgds, Janus -- *Satajanus Nig. Ltd * -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

Re: [Rails] How to Install ruby 1.9.2/1.9.1 and Rails 3.x on Ubuntu

2011-07-10 Thread rajeevsharma86
Please Use RVM. details is on this link http://www.web2linux.com/05/installing-rails-3-on-ubuntu-10-04-lucid-lynx/ On Mon, Jul 11, 2011 at 11:02 AM, Emeka emekami...@gmail.com wrote: Hello All, I have Ubuntu 11-04, I would want to install ruby 1.9.2/1.9.1 and Rails 3.x. I need the least

Re: [Rails] How to Install ruby 1.9.2/1.9.1 and Rails 3.x on Ubuntu

2011-07-10 Thread saikiran mothe
http://rubyhyderabad.blogspot.com/ If you want to install using rvm.Go through these steps. Cheers, Sai On Mon, Jul 11, 2011 at 11:07 AM, rajeevsharma86 rajeevsharm...@gmail.comwrote: Please Use RVM. details is on this link

Re: [Rails] How to Install ruby 1.9.2/1.9.1 and Rails 3.x on Ubuntu

2011-07-10 Thread Dheeraj Kumar
Use RailsReady. It's a one-step setup script to get rvm and ruby running. http://thechangelog.com/post/2857400260/railsready-setup-script-to-get-ruby-and-rails-running On Mon, Jul 11, 2011 at 11:23 AM, saikiran mothe saikiran.mo...@gmail.comwrote: http://rubyhyderabad.blogspot.com/ If you