Re: [Rails-core] Interested in contributing to 'Getting Rails test suite to run on Jruby'

2014-04-22 Thread Dheeraj Kumar
What have you tried? On Apr 22, 2014 6:31 PM, Aditya Bhardwaj aditya2...@gmail.com wrote: Hi everyone, I am a 4th-year CS undergrad and have been keen to contribute to Rails/Jruby for a while. Recently, I came across the topic 'Getting Rails test suite to run on Jruby' on the

Re: [Rails-core] ActiveRecord raw result method.

2014-04-10 Thread Dheeraj Kumar
+1, I do this a lot. On Apr 10, 2014 9:30 PM, Evgeniy Sokovikov skv040...@gmail.com wrote: Hello. Is it possible to get raw sql query result from ActiveRecord::Relation ? Now I can make it this way: sql = Note.select('count(*), commit_id').group(:commit_id).to_sql

Re: [Rails-core] ActiveRecord raw result method.

2014-04-10 Thread Dheeraj Kumar
rafaelmfra...@gmail.com wrote: +1, too. I was planning to add this method because calling `to_sql` is not a good solution. I think the name we choose was `select_all`. Rafael Mendonça França http://twitter.com/rafaelfranca https://github.com/rafaelfranca On Thu, Apr 10, 2014 at 1:03 PM, Dheeraj

Re: [Rails-core] ActiveRecord raw result method.

2014-04-10 Thread Dheeraj Kumar
https://github.com/rafaelfranca On Thu, Apr 10, 2014 at 1:53 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.comwrote: How about #to_a and #to_h instead? #to_h would return the results as a hash, useful when you are retrieving a single row, but many columns. #to_a would return the results

Re: [Rails-core] ActiveRecord raw result method.

2014-04-10 Thread Dheeraj Kumar
think we can't do anything besides make clear what is public and what is private API. Rafael Mendonça França http://twitter.com/rafaelfranca https://github.com/rafaelfranca On Thu, Apr 10, 2014 at 1:53 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.com wrote: How about #to_a and #to_h instead

[Rails-core] Re: [Rails] Required :Embed voice recorder on a webpage for a rural innovation project

2013-08-01 Thread Dheeraj Kumar
Use https://code.google.com/p/wami-recorder/ -- Dheeraj Kumar On Thursday 1 August 2013 at 4:58 PM, sunandan madan wrote: Dear Ruby Community, We are a startup (Dhwani Rural Information Systems (http://dhwani.herokuapp.com)) who help build customized and scalable ICT solutions

Re: [Rails-core] Re: [Rails] Required :Embed voice recorder on a webpage for a rural innovation project

2013-08-01 Thread Dheeraj Kumar
I'm not the OP :) Since this is about rural development and stuff, I assumed the OP's users would be using older, non-HTML5 supported browsers. Hence my recommendation. Also, Red5 seems like an overkill. All he wants is WAV, not a full-blown media server. -- Dheeraj Kumar On Thursday 1

Re: [Rails-core] [ActiveRecord] scope for collection associations

2013-06-03 Thread Dheeraj Kumar
@Jon Leighton Can that scope be removed later? Can I retrieve all comments, including hidden ones? -- Dheeraj Kumar On Monday 3 June 2013 at 5:33 PM, Jon Leighton wrote: In Rails 4 you should be able to do: class Post has_many :comments, - { visible } end On 21/05/13 23:41, Caleb

Re: [Rails-core] [ActiveRecord] scope for collection associations

2013-05-22 Thread Dheeraj Kumar
Ah-ha! Didn't think of the super-without-paranthesis bug! Very subtle, good catch! -- Dheeraj Kumar On Wednesday 22 May 2013 at 4:07 PM, Nicolás Sanguinetti wrote: The problem with that is that you're overloading the meaning of association(flag). When passing a boolean to an association

Re: [Rails-core] [ActiveRecord] scope for collection associations

2013-05-21 Thread Dheeraj Kumar
) show_hidden ? super : super.visible end end Is this the right way? -- Dheeraj Kumar On Wednesday 22 May 2013 at 6:34 AM, Nicolás Sanguinetti wrote: IIRC with Rails 4 associations introduce their methods via a module, which means you can `super` to them, so why not: class Post

Re: [Rails-core] Action View: hidden field tags from nested hash

2013-03-22 Thread Dheeraj Kumar
It feels like a very specific use case. Can you suggest any generic uses for it? -- Dheeraj Kumar On Friday 22 March 2013 at 3:11 PM, Alexey wrote: I have submitted this PR (https://github.com/rails/rails/pull/9622) without any discussion, but maybe i should have asked here first: what do

Re: [Rails-core] sti_object.becomes(Parent) unexpectedly mutating the receiver

2012-07-20 Thread Dheeraj Kumar
Got bit by this a couple of weeks ago. +1 for the merge. Dheeraj Kumar On Saturday 21 July 2012 at 6:14 AM, Peter Brown wrote: Just stumbled upon a pull request from last year (https://github.com/rails/rails/pull/3023) with some discussion and it seemed like people were generally

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Dheeraj Kumar
Rodrigo has made a very important point about which list to use. How do to X with rails - rubyonrails-talk How rails does X - rails-core On 3/3/12, Rodrigo Rosenfeld Rosas rr.ro...@gmail.com wrote: Given the code below, it seems you're just starting using Rails and you still don't understand