[Rails] Re: Restful Authentication Uninitialized Constant in Production...

2009-01-13 Thread rp8 -_-
> This is from running "script/server RAILS_ENV=production" when I just > run script/server, things work fine on the prod server. Both > environments work fine on the dev server... Are you using AASM by any chance? You might need to add "require 'aasm'" i

[Rails] Re: Updating multiple databases at the same time

2009-01-13 Thread rp8 -_-
tially you generate messages destined to each DB and each DB will process its queue. Of course, you might have to devise some additional messages to compensate any actions rolled back in the master/slave due to some reasons like errors etc. Regards, rp8 =

[Rails] Re: ROR - Excel Export Example

2009-01-13 Thread rp8 -_-
@sort_by = 'last_name' > current_user = 'steve' > @records = Contact.find( > :all, > :conditions => ["created_by = ?", > self.current_user.login.to_s] #, > #:order => @sort_by > ) > As server si

[Rails] Re: error with production setup on Linode

2009-01-05 Thread rp8 -_-
1.3.0 > > Passenger 2.0.6 > > > http://thecatatemysourcecode.com > > > thank you, > > Jason What DB are you using? Is it accepting connection from unix socket or tcp? We're using same vendor and similar setup except we use nginx/t

[Rails] Re: [Please help!]store parameters variable into database

2009-01-05 Thread rp8 -_-
Ukrit Himakoon wrote: > rp8 -_- wrote: >> One way is to save a serialized hash into the db and you can deserialize >> the saved hash object back to params. >> >> Regards, >> >> rp8 >> === >> http://lun.competo.com > &g

[Rails] Re: Form Posts Across Different Controllers?

2009-01-05 Thread rp8 -_-
s in your config/routes.rb to hook up the url used in your form and how it's routed to a controller's method. Usually any errors/message shown in the debug or script/server console messages should help you see the request url posted by your form and if it's understood by the rou

[Rails] Re: [Please help!]store parameters variable into database

2009-01-05 Thread rp8 -_-
One way is to save a serialized hash into the db and you can deserialize the saved hash object back to params. Regards, rp8 === http://lun.competo.com -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Guarding "params" (for security reasons)

2008-12-20 Thread rp8 -_-
ring writing something like this: > id = validate_params(params[:id], "string", 10) # 10 being > max_length ActiveRecord has may validations callbacks such as validate_presence_of, etc. It's preferrable to validate data in the models instead of controllers. Rega

[Rails] Re: Running background jobs

2008-12-20 Thread rp8 -_-
I'd prefer a queue based messaging solution to decouple the senders from the receiving/processing side. It's simple and scales well. Ben Knight wrote: > How are most of you running background jobs in Rails? > > I was reading this and considering going with script/runner but wanted > to do an in

[Rails] Re: render :json and associations

2008-12-20 Thread rp8 -_-
use eager loading on your @orders with :include option or use :select to add attributes from address if you only need limited data from address and performance is a concern. Regards, rp8 === http://lun.competo.com/ Frederick Cheung wrote: > On Dec 20, 2:55

[Rails] Re: API versioning strategy

2008-12-20 Thread rp8 -_-
otherwise the versioning might be better handled at the message level. ie, your message may have a header with v=v1, etc. Regards, rp8 === http://lun.competo.com/ Zac Zheng wrote: > I am developing a service to be accessed within a browser and via API. I > am not sure w

[Rails] Re: RoR IDE

2008-12-20 Thread rp8 -_-
nd have not really made my mind up on that one yet. I use rails.vim. On Windows, you need cygwin. I have tried all IDEs and settled down on rails.vim. It's long circle and ended at vi finally:-). Regards, rp8 === http://lun.competo.com/ > > I would love to he

[Rails] Re: RoR deployment and maintenance

2008-12-19 Thread rp8 Lun
, that works too. cheers, rp8 Krishna wrote: > Hi, > I have a developed and working RoR prototype. So far its been > mostly in development mode environment and under script/server on > windows .I want to move it to a hosting server and continue > development. > > Whats the best

[Rails] [ANN] Lun - Free Commenting Service for Any Web Pages

2008-12-19 Thread Rp8 Rp8
Hi, We have launched a free service, Lun - http://lun.competo.com, to provide commenting interactions to any web pages with static or dynamic contents. It's built on Rail 2.2.2. Plus it provides: Latest comments, Top posts and Comments counters. Supported browsers: IE 6, FireFox 2/3, Opera, Saf