[Rails] Http Rest call and JSON response

2010-05-30 Thread Deepak R k
I am trying to call remote server rest api , the response type of call is json data. plz give me tips how to do this . I am new in rails . -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] How would I create a tagged domain?

2010-05-30 Thread Joe
Hi, Basically I recently been playing around with my ruby on rails system, and I'm wondering how I can get it to pick some words from the :name of the tutorial (I have a system with categories and tutorials) and make this into what I call a tagged domain, basically instead of it showing the ID in

[Rails] Re: Error while installing Rails using gem install rails

2010-05-30 Thread Daniel Wozniak
I was getting the same error. Install the fcgi header files with this package: sudo apt-get install libfcgi-dev -- Posted via http://www.ruby-forum.com/. -- 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

[Rails] Re: passenger on localhost

2010-05-30 Thread Ahmet Kilic
Steve Ross wrote: Ahmet Kilic wrote: DocumentRoot /var/www/site/public /VirtualHost and its running fine in development. Check /log dir, and look for development.log file,. it is Ok for me also. But why it is not working with RailsEnv production??? Is it not a bit strange!?:( So,

[Rails] Automatically decrement value each day

2010-05-30 Thread Becky Russoniello
I have a Person model with a points attribute. For the most part, points values will be incremented and decremented via user votes. However, I'd also like to decrement a Person's points by half a point each day. How do I automatically decrement the value once per day? Your help is greatly

[Rails] Association and Filtering

2010-05-30 Thread RobZ1
Hopefully a quick one : I have a products table and in the view I am showing these products as well as a sidebar to filter the products by team, size, color etc (which are all attributes of other join tables).What is the most efficient (in terms of best practice) way of getting the filtered

Re: [Rails] Automatically decrement value each day

2010-05-30 Thread Tim Lovett
Id suggest using a database job but you could always just store when you last decreased it date and then on sign in do the decrease. If you plan on showing other users the points you'd need the job. On May 30, 2010 12:37 PM, Becky Russoniello li...@ruby-forum.com wrote: I have a Person model

[Rails] Re: Handling custom error files (404/500) in Rails 3

2010-05-30 Thread anywho
anyone? On May 27, 10:29 am, anywho eydai...@gmail.com wrote: I've been looking at rescue_from and rescue_action_in_public however, none of them have worked without making a catch-all route. So currently, my solution is to use the catch-all route:   match '*path' = controller#action # custom

[Rails] Re: Automatically decrement value each day

2010-05-30 Thread Becky Russoniello
Hi Tim, Thanks for responding. Sorry if this is a dumb question, but what do you mean by database job? This is going to be a ranked list (current points value determines the ranking), and I'd like users to be able to view the list without being logged in. Tim Lovett wrote: Id suggest

[Rails] Re: passenger on localhost

2010-05-30 Thread Steve Ross
Ahmet Kilic wrote: Steve Ross wrote: Ahmet Kilic wrote: DocumentRoot /var/www/site/public /VirtualHost and its running fine in development. Check /log dir, and look for development.log file,. it is Ok for me also. But why it is not working with RailsEnv production??? Is it not a bit

[Rails] Re: numbers of the days

2010-05-30 Thread John Crepezzi
Sorry for the delay in response, for some reason I never got a notification.. Glad you like IceCube so far! First, the indexes in your code below should be 0-6, not 1-7 (where 0 is sunday) Also, you're missing your add_recurrence_rule call -- should be: schedule.add_recurrence_rule

[Rails] Re: Automatically decrement value each day

2010-05-30 Thread Sharagoz
I would use a scheduler for this kind of stuff. A pure ruby solution is rufus scheduler: http://github.com/jmettraux/rufus-scheduler With rufus scheduler you can schedule a routine that runs every day at a given hour and decrements every persons points by 0.5. On May 30, 8:35 pm, Becky

[Rails] Re: Why was overwrite_params deprecated in Rails 3?

2010-05-30 Thread Spacen Jasset
Ditto. I've returns to a small rails app after a while to discover overwite_params is deprecated, and I havn't found out why yet. Presumably the workaround is to DIY and take everything from request.params replacing the bits you want to. (for instance filtering a few of multiple options using

[Rails] Re: Automatically decrement value each day

2010-05-30 Thread Becky Russoniello
Wow! Perfect. Thank you so much. Sharagoz wrote: I would use a scheduler for this kind of stuff. A pure ruby solution is rufus scheduler: http://github.com/jmettraux/rufus-scheduler With rufus scheduler you can schedule a routine that runs every day at a given hour and decrements every

[Rails] Re: Why was overwrite_params deprecated in Rails 3?

2010-05-30 Thread Spacen Jasset
Will this work ok? instead of: !-- %= link_to 'All', url_for(:overwrite_params = {:listing_type = nil}) % -- this: %= link_to 'All', url_for( request.params.merge({ :listing_type = nil}) ) % -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: XMLHttpRequest and Rails

2010-05-30 Thread matt kauffman
If you're set on doing the ajax through jQuery try adding this to your page and watch the console logs in firebug (obviously replacing 'posts and 'index' with the route to the model and action you're polling): // poll the posts index every 3000 milliseconds logging the response to the console.

[Rails] [Rails 3] Path helper not working as expected with form_for

2010-05-30 Thread Michael Jurewitz
Hi there, I can't seem to get form_for to work correctly with the URL I'm providing for a set of nested resources. Here's what I'm doing in routes.rb: resources :threads do resources :messages end And then I've got the following form that I'm building as part of

[Rails] Trying to make new instance variables for each item in render :partial

2010-05-30 Thread Bob Smith
I have a list of people I am using as the collection for a render :partial. This is for a list of users that is being made into a pdf. I need to do 3 find calls to find out their attendance for the last 3 years. The only way I can find to do this is to have the print function call its view and

[Rails] Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP?

2010-05-30 Thread dave4...@greatchiro.com
Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP? It does not work for me, the sample program crashes with no error message. -- 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