[Rails] Re: Active Record Query

2010-09-18 Thread Lecky
I think the problem is come from this line: current_user.permissions.find_by_project_id(project_id).role.try(:name).nil ? And I am thinking if using try then it doesn't need to use .nil. You can run this query in console to debug it. Cheers, Lecky Lao On Sep 18, 3:46 pm, nobosh bhellm

[Rails] Re: How can I improvement concurrence performance?

2010-06-28 Thread Lecky
Try to use some third party web service to host your app, like Heroku or Amazon Web Service EC2. Cheers, Lecky Lao On Jun 25, 6:25 pm, Zhao Yi li...@ruby-forum.com wrote: I found that if many users access to Rails at the same time, users will wait for a long time. How can I set the concurrence

[Rails] Re: testing and migrations

2010-06-27 Thread Lecky
Rake db:test:clone? On Jun 27, 2:31 am, anywho eydai...@gmail.com wrote: does rails always need to update the development database before running the tests? It seems to insisit on running db:migrate before. Why can't it just update the test database? This can be annoying if I'm in a

[Rails] Re: best practices for putting rails site out on the internet with authentication

2010-06-26 Thread Lecky
I have a similar case here. My project also using Devise and we are trying to restrict access to users even robots to the public site. What we have done is using Devise http_authenticatable to authenticate users in our database, which is working quite well. Cheers, Lecky On Jun 26, 5:24 am

[Rails] Re: Custom account subdomains with Rails 3

2010-06-25 Thread Lecky
Have a look at this article: http://www.taylorluk.com/2009/08/hey-pac-man-sup-subdomains On Jun 24, 8:28 pm, Piotr Sarnacki dro...@gmail.com wrote: Hi, I needed to handle custom account subdomains with Rails and I wrote a simple rack middleware for thathttp://github.com/drogus/rack-subdomain.

[Rails] Re: Development: How to setup Virtual Machine for Rails

2010-06-25 Thread Lecky
Try Virtual Rails: http://www.virtualrails.org/ On Jun 25, 7:31 am, Ali Imran ali.imran.r...@gmail.com wrote: I am working on windows xp I install Virtual machine How... http://www.pendrivelinux.com/running-linux-from-within-windows-virtua... ISO...(i install Ubuntu)

[Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-24 Thread Lecky
Hi Joe, Firstly, this code goes in config/application.rb. Secondly, you can write regular expression like the example did to redirect your URLs. Cheers, Lecky On Jun 24, 2:51 am, Joe j...@dev-hq.co.uk wrote: I see code like this used in examples: config.gem 'rack-rewrite', '~ 1.0.0

[Rails] Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Lecky
Nice, support + 1~ On Jun 24, 7:27 am, Jerome Fillioux li...@ruby-forum.com wrote: the new virtualrails 1.1 now includes git, mongodb, capistrano, ack, vim, and an improved US keyboard support :) check it athttp://www.virtualrails.org -- Posted viahttp://www.ruby-forum.com/. -- You

[Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-23 Thread Lecky
Try gem rack-rewrite, that can solve your problem. Cheers, Lecky On Jun 23, 6:16 am, Joe j...@dev-hq.co.uk wrote: Bump?! Can anyone help with this? On 21 June, 17:11, Joe j...@dev-hq.co.uk wrote: Im currently in the process of adding permalinking to my site; at the moment I am simply