Re: [Rails] nginx + passenger + mongoid

2011-06-08 Thread Dheeraj Kumar
Forgive me for asking the obvious, but did you set the db_name in the production area of database.yml? On Thu, Jun 9, 2011 at 8:18 AM, Alex Katebi alex.kat...@gmail.com wrote: When I set the rails_env to production in nginx.conf I get: Error message: db_name must be a string or symbol --

Re: [Rails] error of undefined method `each' for #Picture:0x927dea0

2011-06-09 Thread Dheeraj Kumar
Simple. You get only one picture object (the first one) because you're using .first method. Since you have only one object, you can't iterate over it using the each loop. Get it? Just use @user.image instead in the view :) On Fri, Jun 10, 2011 at 9:46 AM, joanne joanne0...@gmail.com wrote: hi

Re: [Rails] Which Ubuntu version is recommended for Rails 3?

2011-06-23 Thread Dheeraj Kumar
Any ubuntu will do - You can use the latest 11.04 or 10.10 or whatever. Just run railsready script and you're good to go on a fresh linux install. https://github.com/joshfng/railsready On Thu, Jun 23, 2011 at 8:17 PM, Sebastian sebastian.go...@googlemail.comwrote: Hi, I have developed a

Re: [Rails] Uploading files asynchronously

2011-06-27 Thread Dheeraj Kumar
Use http://blueimp.net jquery-based ajax uploader. On Mon, Jun 27, 2011 at 11:04 PM, danimashu daniel.madrid.re...@gmail.comwrote: Hi, now I have working a form for upload images. I'm using 'nested_form', 'paperclip' and 'aws-s3' for storage. All works fine but I would get better. The problem

Re: [Rails] Sending Excel file as a Mail attachment in ROR

2011-07-06 Thread Dheeraj Kumar
Please read the docs. http://api.rubyonrails.org/classes/ActionMailer/Base.html On Wed, Jul 6, 2011 at 5:46 PM, Runa roonadan...@gmail.com wrote: Hi All, Please help me out. I want to add the excel file as attachment to mail in ROR. Regards, -- You received this message because you

Re: [Rails] Is it possible to use a site layout *without* a controller?

2011-07-08 Thread Dheeraj Kumar
If all you want is to render static HTML, I suggest using nanoc from nanoc.stoneship.org, and use thin to serve it, and Maybe nginx to act as a front. On Sat, Jul 9, 2011 at 10:39 AM, Phoenix Rising polarisris...@gmail.comwrote: I'm in the process of doing some front-end design and planning,

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

2011-07-08 Thread Dheeraj Kumar
The best way to make a social networking site... is to actually start making a social networking site. On Sat, Jul 9, 2011 at 11:08 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Fri, Jul 8, 2011 at 10:25 PM, Amrit Pal Pathak amritpalpath...@gmail.com wrote: Which is the best

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

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

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

Re: [Rails] rails installation problem

2011-07-11 Thread Dheeraj Kumar
No point using ruby via apt-get. You need to install RVM, and ruby. An easy way is to use RailsReady - a one step ruby installation script. http://thechangelog.com/post/2857400260/railsready-setup-script-to-get-ruby-and-rails-running PS: Kanchi has a LUG? thats news to me :) I'm from Chennai

Re: [Rails] Help with Helpers

2011-07-11 Thread Dheeraj Kumar
Helpers help generate code for the view. For example, if you have an array of items that need to be rendered in a specific way, you can encapsulate that functionality in a helper method, and call it from the view. It helps clean up the view code, and adds code reuse. So helpers are meant to be for

Re: [Rails] How to call ruby script using AJAX?

2011-08-12 Thread Dheeraj Kumar
Use jQuery. http://api.jquery.com/jQuery.ajax/ You'll need to provide a route, and in the server side, call the ruby script in the controller's action which receives the route. On Fri, Aug 12, 2011 at 12:05 PM, Amit Bobade amit.sr...@gmail.com wrote: Dear all, I need your help. Could someone

Re: [Rails] How to call ruby script using AJAX?

2011-08-12 Thread Dheeraj Kumar
You're welcome :) On Fri, Aug 12, 2011 at 12:32 PM, Amit Bobade amit.sr...@gmail.com wrote: ThanksDheeraj. It's really helpful. Thank you so much.. On Fri, Aug 12, 2011 at 12:10 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.com wrote: Use jQuery. http://api.jquery.com/jQuery.ajax

Re: [Rails] i need code

2011-08-12 Thread Dheeraj Kumar
This should help you. Action Mailer Railscast: http://railscasts.com/episodes/206-action-mailer-in-rails-3 On Fri, Aug 12, 2011 at 10:37 AM, hanish jadala emailtohoneyr...@gmail.comwrote: i want to send a email using ror in html table format how can i do that .i need code for this --

Re: [Rails] Building a webservice with ruby on rails

2011-08-13 Thread Dheeraj Kumar
Have you tried this? http://squarism.com/2011/04/01/how-to-write-a-ruby-rails-3-rest-api/ On Sun, Aug 14, 2011 at 6:03 AM, Ronaldo Paiva li...@ruby-forum.com wrote: Hi, i'm new in this forum. I need build a web service with ruby on rails, but i don't found a example that works. Somebody

Re: [Rails] Re: How to create a custom time select form element?

2011-08-14 Thread Dheeraj Kumar
I highly recommend using jQueryUI Datepicker for more usable date selection. However, if you want to have it your way, create fields in your model for all the select boxes, and use the before_save callback to construct the final date field for storing in the database. Refer

Re: [Rails] Re: RUBY ON RAILS MIGRATION

2011-08-14 Thread Dheeraj Kumar
3. Yes. http://compositekeys.rubyforge.org/ On Sun, Aug 14, 2011 at 12:42 PM, Colin Law clan...@googlemail.com wrote: On 14 August 2011 05:04, Nagesh Shenoy li...@ruby-forum.com wrote: Thank you Walter and Colin for giving such a good idea. I ll try with foreigner gem and will go through

Re: [Rails] Re: How to create a custom time select form element?

2011-08-14 Thread Dheeraj Kumar
The Ruby Programming Language by Matz is my personal favorite. You might want to try that. On Sun, Aug 14, 2011 at 1:05 PM, 7stud -- li...@ruby-forum.com wrote: however, it's the Ruby part that I am not as familiar with. Then it's time to put rails away and buy a beginning ruby book. --

Re: [Rails] Re: RegExp error:

2011-08-15 Thread Dheeraj Kumar
Agreed. @OP: You should try this instead: http://edgeguides.rubyonrails.org/active_record_validations_callbacks.html#numericality On Mon, Aug 15, 2011 at 2:41 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Aug 14, 7:29 pm, Misha Ognev li...@ruby-forum.com wrote: Hi! This

Re: [Rails] Saving Google Map Image

2011-09-16 Thread Dheeraj Kumar
Get the center, width, height. Use Google Static Map API to retrieve a image with those data. On Fri, Sep 16, 2011 at 4:35 PM, Mathew Vivek li...@ruby-forum.com wrote: Hi, Is there is any option for saving a google map image while submitting a page. thanks in advance Mathew --

Re: [Rails] Re: Saving Google Map Image

2011-09-16 Thread Dheeraj Kumar
Did you see this? http://code.google.com/apis/maps/documentation/staticmaps/#quick_example If this is not the output you require, please be clear in what you need. On Fri, Sep 16, 2011 at 7:42 PM, Mathew Vivek li...@ruby-forum.com wrote: Dheeraj Kumar wrote in post #1022296: Get the center

Re: [Rails] Re: A gem that handles authentication AND authorization for me

2011-10-15 Thread Dheeraj Kumar
I personally use Devise + CanTango (a roles layer on top of CanCan, an authorization provider) and it's really really easy to set it up and get going. You should really try the combo out. On Sun, Oct 16, 2011 at 2:22 AM, Brandon Black brandonmbl...@gmail.comwrote: For some reason everyone seems

[Rails] Re: Having a terrible time

2011-11-19 Thread Dheeraj Kumar
I don't really see why you have problems installing RoR. Windows is not recommended, of course. What I do is I install a fresh copy of Ubuntu, and then run railsready from https://github.com/joshfng/railsready Dheeraj Kumar On Saturday 19 November 2011 at 10:09 PM, Mathew S. wrote: Hey

[Rails] Re: Having a terrible time

2011-11-19 Thread Dheeraj Kumar
ones exist, like RubyMine and Aptana Studio Dheeraj Kumar On Saturday 19 November 2011 at 10:16 PM, Dheeraj Kumar wrote: I don't really see why you have problems installing RoR. Windows is not recommended, of course. What I do is I install a fresh copy of Ubuntu, and then run railsready

[Rails] Re: Git + Gedit Starting the process

2011-11-19 Thread Dheeraj Kumar
First get a copy of Agile Web Development with Rails - the latest online ebook covers rails 3.1, the printed ones don't yet. That's THE primer. Dheeraj Kumar On Sunday 20 November 2011 at 2:14 AM, Mathew S. wrote: So I finally got Git and Gedit setup properly. How should I start? I got

[Rails] Re: Fresh Rails install won't use version 3.1

2011-11-25 Thread Dheeraj Kumar
Just run railsready (https://github.com/joshfng/railsready) on a fresh linux installation, and you're done. Dheeraj Kumar On Friday 25 November 2011 at 10:59 PM, Norbert Melzer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 25.11.2011 01:44, schrieb Red: I thought

[Rails] Re: CSS Problem.

2011-11-28 Thread Dheeraj Kumar
You could start with 3.0 and move up to 3.1, as 3.1 introduced several major changes. Dheeraj Kumar On Monday 28 November 2011 at 3:56 PM, Somnath Mallick wrote: Ok... I will go step by step. And reach the last chapter. But thanks for the help. Not finding myself at home with Ruby

[Rails] Re: Some advice to choose framework for a web application

2011-11-29 Thread Dheeraj Kumar
encouraged in Rails. A popular and great combination is RSpec/Shoulda Dheeraj Kumar On Tuesday 29 November 2011 at 11:59 PM, Vinh Quốc Nguyễn wrote: Hi, This question may asked so many times. I google about it and got lots of discuss generally. After reading all of them, I go

[Rails] Re: Juggernaut server

2011-12-01 Thread Dheeraj Kumar
Did you even bother to read the documentation? Dheeraj Kumar On Thursday 1 December 2011 at 9:08 PM, Vivek Dwarakacharla wrote: How to implement the chatting application in rails3 using Juggernaut server -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: Need Some Guides on Solr with Rails.

2011-12-02 Thread Dheeraj Kumar
First, make sure java is installed properly by Hassan Schroeder's post. Then, download and set up Solr. Then, install the sunspot gem Then, RTFM. This entire post could have been avoided then... Dheeraj Kumar On Friday 2 December 2011 at 9:16 PM, Hassan Schroeder wrote: On Fri, Dec 2, 2011

[Rails] Re: Major Headache incoming

2011-12-03 Thread Dheeraj Kumar
Buy a book. Agile Web Development with Rails. It has a new edition for rails 3.1. It's considered to be the primer for all beginning RoR developers. Dheeraj Kumar On Sunday 4 December 2011 at 5:30 AM, Mathew S. wrote: Here we go again. I apologize in advance. When I'm trying to learn both

[Rails] Re: Stack overflow

2011-12-06 Thread Dheeraj Kumar
Haha! @OP: Please be more specific. Dheeraj Kumar On Tuesday 6 December 2011 at 2:14 PM, Michael Pavling wrote: On 6 December 2011 02:00, Richard Lung weilung.n...@gmail.com (mailto:weilung.n...@gmail.com) wrote: I want to implement small-scale Stack overflow. any idea

[Rails] Re: CPanel and web hosting

2011-12-14 Thread Dheeraj Kumar
tell me what are the advantages of using cPanel to manage RoR? Dheeraj Kumar On Thursday 15 December 2011 at 8:41 AM, Ralph Shnelvar wrote: My current ISP uses CPanel. Sadly, my ISP is not giving me the support I need. He has some firewall stuff that is causing my website to report 406

[Rails] Re: view the design and coding part of rails website.

2011-12-15 Thread Dheeraj Kumar
That's not really how rails works. I suggest you open the controller, the associated model(s), the view, the associated partial(s) and the layout to actually check out what happens in the page Dheeraj Kumar On Thursday 15 December 2011 at 4:16 PM, amvis wrote: have any IDE like

[Rails] Re: select database after login

2011-12-18 Thread Dheeraj Kumar
I'm thinking it might be a multi tenant, but with the same initial UI. That's one possible use case. Dheeraj Kumar On Monday 19 December 2011 at 5:09 AM, BirdieTracker wrote: You may be able to set up an abstract model with two child models in which each child uses a different database

[Rails] Re: Installing Ruby, I Exported Bash Profile Twice

2011-12-24 Thread Dheeraj Kumar
Just run railsready, and your mac will be set up fully. Dheeraj Kumar On Saturday 24 December 2011 at 3:32 AM, OSXyZ wrote: Hell All, Yep, I'm new to Ruby. I was following the Lynda.com (http://Lynda.com) tutorial and seemed to exported the bash profile twice. All I know

[Rails] Re: Conflicting libraries: jQuery.js accordion.js

2012-01-01 Thread Dheeraj Kumar
put, it's the document.ready where you define your event handlers, or jquery code if you prefer. c. w3schools.com, jqfundamentals.com Dheeraj Kumar On Sunday 1 January 2012 at 10:26 PM, Ralph Shnelvar wrote: Zachary, This is over my head. a) What does the :javascript do? Where

[Rails] Re: How to test the model dependence ?

2012-01-27 Thread Dheeraj Kumar
I usually use Shoulda for this: http://rubydoc.info/gems/shoulda/frames should belong_to(:user) should have_many(:tags).through(:taggings) Dheeraj Kumar On Friday 27 January 2012 at 4:51 PM, Guilherme R. wrote: Good morning, I'm new to rails and am having some basic questions

[Rails] Re: Polymorphic association

2012-01-27 Thread Dheeraj Kumar
You can use :class_name and :foreign_key if that's what you're looking for. Dheeraj Kumar On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: I want this because I'm going to have to has_many associations to comments (to follow to same example): class User has_many

[Rails] Re: Polymorphic association

2012-01-27 Thread Dheeraj Kumar
Sure does :D Dheeraj Kumar On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote: Yes, exactly! Does that :class_name works for has_many? I'll try that now anyway. Thank you On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.com (mailto:a.dheeraj.ku

[Rails] Re: Ruby gems for Single Sign On

2012-01-30 Thread Dheeraj Kumar
Er… That's not what SSO means. @OP: OmniAuth by Intridea is quite famous, and a lot of people use it. Here's a guide I found helpful for SSO using omniauth + devise http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/ Dheeraj Kumar

[Rails] Re: Reserwavtion system - action book

2012-02-06 Thread Dheeraj Kumar
You should move most conditions to validations. That IMHO is the best way to refactor this. Dheeraj Kumar On Tuesday 7 February 2012 at 12:19 AM, Dave Aronson wrote: On Mon, Feb 6, 2012 at 13:16, regedarek dariusz.fins...@gmail.com (mailto:dariusz.fins...@gmail.com) wrote: How

[Rails] Re: Ruby on Rails Equality

2012-02-07 Thread Dheeraj Kumar
{ redirect_to root_url } end else format.html { redirect_to root_url } end Dheeraj Kumar On Tuesday 7 February 2012 at 8:27 PM, Martin Aceto wrote: On Tue, Feb 7, 2012 at 11:39 AM, Christopher Jones li...@ruby-forum.com (mailto:li...@ruby-forum.com) wrote: Hi all, Just wondering about

[Rails] Re: Ruby on Rails Equality

2012-02-07 Thread Dheeraj Kumar
You're welcome :) Dheeraj Kumar On Wednesday 8 February 2012 at 1:04 AM, Christopher Jones wrote: Been working on it this afternoon guys and made a fair few tweaks and it has resulted in success. Thanks for all the help guys. -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: Live Rugby @@ Italy vs England Live Stream Rugby RBS Six Nations 2012 Online Free TV On PC

2012-02-11 Thread Dheeraj Kumar
: http://en.wikipedia.org/wiki/Scrum_(rugby_union) They also suffer from varying numbering schemes: http://en.wikipedia.org/wiki/Rugby_union_numbering_schemes Their version of Matz: http://en.wikipedia.org/wiki/Rugby_School Dheeraj Kumar On Saturday 11 February 2012 at 10:14 PM, Javier Quarite

[Rails] Re: new project with --no-test-framework, but when creating a model it invoked test_unit

2012-02-12 Thread Dheeraj Kumar
Just remove the entire test directory. Dheeraj Kumar On Sunday 12 February 2012 at 10:21 PM, S Ahmed wrote: How can I fix this now (my project is already created)? On Sun, Feb 12, 2012 at 8:36 AM, Xavier Dutreilh xav...@dutreilh.fr (mailto:xav...@dutreilh.fr) wrote: --no-test

[Rails] Re: new project with --no-test-framework, but when creating a model it invoked test_unit

2012-02-12 Thread Dheeraj Kumar
/railtie I have a question, though. Why skip writing unit tests? That's not a good practice. Dheeraj Kumar On Sunday 12 February 2012 at 10:38 PM, S Ahmed wrote: but future rails generators will create it again. On Sun, Feb 12, 2012 at 11:57 AM, Dheeraj Kumar a.dheeraj.ku...@gmail.com

Re: [Rails] rake db:reset doesn't work, fails with unknown attribute: user_status

2012-02-19 Thread Dheeraj Kumar
Why doesn't rake -T show db:reset? Where can I find a list of these hidden rake commands? On Feb 19, 2012 6:36 PM, Peter Vandenabeele pe...@vandenabeele.com wrote: On Sat, Feb 18, 2012 at 5:42 PM, S Ahmed sahmed1...@gmail.com wrote: If I manually drop the database, and run create, then migrate

Re: [Rails] rake shortcut for drop, create, migrate, seed for development and test

2012-03-03 Thread Dheeraj Kumar
Note that rake db:reset takes your current schema.rb and implements it in the database. It does not run all your migrations again. I don't know about rake db:migrate:reset. Is there a reason why some tasks like rake db:reset and rake doc:rails are not visible when we run rake -T? How do we see

[Rails] Re: how to use wicked_pdf

2012-03-28 Thread Dheeraj Kumar
@OP: Did you even try reading the github's Readme before posting? It has very clear documentation. Please do that from next time. Dheeraj Kumar On Wednesday 28 March 2012 at 4:18 PM, Priyanka Pathak wrote: Hi, Hope below reference is help you out. http://priyankapathak.wordpress.com

[Rails] Re: devise authenticate_user! causing test fail

2012-04-03 Thread Dheeraj Kumar
login_user should be inside a before_each block. Dheeraj Kumar On Tuesday 3 April 2012 at 3:34 PM, Aashish Kiran wrote: Hi all, I could not run a simple test case. My app uses devise,rspec, etc. The problem code is at http://pastie.org/3719793 can anyone please help Thank you, Aashish

[Rails] Re: How to extract an image and its info from MP3 file.

2012-04-03 Thread Dheeraj Kumar
taglib-ruby. Next time, please google before posting. Dheeraj Kumar On Tuesday 3 April 2012 at 3:44 PM, Rajesh B. wrote: Hi I am developing a music related project. in ruby on rails in that when a user uploads an mp3 file . can i extract its image if present and other information

[Rails] Re: rake db:test:prepare

2012-04-03 Thread Dheeraj Kumar
' and that's it. Dheeraj Kumar On Wednesday 4 April 2012 at 3:13 AM, Frederick Cheung wrote: On Apr 3, 9:43 pm, @1337807 jonanscheff...@gmail.com (http://gmail.com) wrote: Why is it necessary for me to run 'rake db:test:prepare' when I generate a new model? it shouldn't

[Rails] Re: All Integration Tests Fail When They Shouldn't

2012-04-10 Thread Dheeraj Kumar
Did you migrate in test environment? Dheeraj Kumar On Tuesday 10 April 2012 at 2:48 AM, Nick Apperley wrote: Whenever I run the integration tests I find that if one test fails they all fail. This occurs even if one or more of the tests should succeed. Tried various solutions like clearing

[Rails] Re: Trivial Rails Question, I am unable to explain the behavior

2012-04-19 Thread Dheeraj Kumar
The find method takes the option hash as the last parameter. Either use Model.all(options) or Model.find(:all, options) The correct code is: @grades = Grade.find(:all, {|grade| Worksheet.find(:all,:conditions= ['grade_id =?',grade.id (http://grade.id)]).count 0}) Dheeraj Kumar On Friday

[Rails] Re: Bluehost - Rails 3

2012-04-27 Thread Dheeraj Kumar
Rails on a shared hosting? HA! Get a free Heroku account for development testing, a cloud hosting, VPS or a dedicated server for deployment. Dheeraj Kumar On Friday 27 April 2012 at 5:10 PM, Kevin Bedell wrote: Forget blue host. Get an account on heroku and push it there. If you're

[Rails] Re: Getting Years, Months and days from a day of born

2012-05-01 Thread Dheeraj Kumar
You're looking for the time_diff gem. https://github.com/abhidsm/time_diff Dheeraj Kumar On Tuesday 1 May 2012 at 1:52 PM, Amir Z. wrote: Hi Gonzalez, We can create script using present date and date of born. Years = present year - birth year Days= present date - birth date Months

[Rails] Re: 1line RVM+Rails install script for Ubuntu

2012-05-04 Thread Dheeraj Kumar
This is what you're looking for. https://github.com/joshfng/railsready For windows, there's http://railsinstaller.org/ Dheeraj Kumar On Friday 4 May 2012 at 6:12 PM, YogiZoli wrote: Hi, we've found 1click install for Win and Mac but not for Ubuntu. We've made a 1 line RVM and Rails

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
You need a before_filter. http://edgeguides.rubyonrails.org/action_controller_overview.html#filters Dheeraj Kumar On Saturday 12 May 2012 at 5:53 AM, Lauro Caetano wrote: Hi! I'm a RoR beginner and I'm trying to make a gem that can intercepts all action from my controllers. I

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
You need a before_filter. http://edgeguides.rubyonrails.org/action_controller_overview.html#filters Dheeraj Kumar On Saturday 12 May 2012 at 5:53 AM, Lauro Caetano wrote: Hi! I'm a RoR beginner and I'm trying to make a gem that can intercepts all action from my controllers. I

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
You need a before_filter. http://edgeguides.rubyonrails.org/action_controller_overview.html#filters Dheeraj Kumar On Saturday 12 May 2012 at 5:53 AM, Lauro Caetano wrote: Hi! I'm a RoR beginner and I'm trying to make a gem that can intercepts all action from my controllers. I

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
a filter class. http://stackoverflow.com/questions/2913113/access-params-and-local-attributes-in-static-class-as-filter Dheeraj Kumar On Saturday 12 May 2012 at 6:20 AM, Jeremy Walker wrote: On 12 May 2012 01:48, Lauro Caetano laurocaeta...@gmail.com (mailto:laurocaeta...@gmail.com

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
]) # Some other operation involving MyGem if you need... end def show respond_with(@task) end end Dheeraj Kumar On Saturday 12 May 2012 at 6:37 AM, Lauro Caetano wrote: I'm trying to do this: class ApplicationController ActionController::Base include MyGem end

[Rails] Re: How to intercept each action call?

2012-05-11 Thread Dheeraj Kumar
inherit from ApplicationController. Dheeraj Kumar On Saturday 12 May 2012 at 6:49 AM, Dheeraj Kumar wrote: I understand. See the link I posted, where the OP does exactly your requirement. Here's some code: class ApplicationController ActionController::Base include MyGem end class

Re: [Rails] Re: devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-12 Thread Dheeraj Kumar
I can give you a help. Dheeraj Kumar On Friday 13 July 2012 at 9:32 AM, Hassan Schroeder wrote: On Thu, Jul 12, 2012 at 8:49 PM, bill gate li...@ruby-forum.com (mailto:li...@ruby-forum.com) wrote: who can give me a help?! Ah, you wanted the 20-minute response time plan

Re: [Rails] f.send in form?

2012-07-30 Thread Dheeraj Kumar
Of course! Are you encountering any problems with that? Dheeraj Kumar On Tuesday 31 July 2012 at 3:31 AM, Me wrote: Can you do f.send in a form? I have questions and the data type stored in a db. % Question.all.each do |question| % div class=control-group

Re: [Rails] Speed Up rake?

2012-07-31 Thread Dheeraj Kumar
Use either spark or parallel_tests Dheeraj Kumar On Tuesday 31 July 2012 at 11:11 PM, Salvatore Pelligra wrote: Testing with rake is REALLY time consuming! Every time I have to run a test, it eat up something like 4 to 6 seconds, only for start up O_O There's nothing we can do to speed

Re: [Rails] Re: How do I force link_to/form helpers to use the superclass name in the path instead subclass?

2012-08-08 Thread Dheeraj Kumar
It's simple. Use AR::Base#becomes Dheeraj Kumar On Thursday 9 August 2012 at 12:20 AM, Mohamad El-Husseini wrote: I'm using Rails 3.2. And I'm pretty sure you can. Basically, to get a form to post to the right model I need to set it up generically. My initial form was: = simple_form_for

Re: [Rails] Re: How do I force link_to/form helpers to use the superclass name in the path instead subclass?

2012-08-08 Thread Dheeraj Kumar
http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-becomes class User Person end u = User.first u.class.name #= User p = u.becomes(Person) p.class.name #= Person Dheeraj Kumar On Thursday 9 August 2012 at 12:38 AM, Mohamad El-Husseini wrote: Sorry, can you clarify

Re: [Rails] Re: How do I force link_to/form helpers to use the superclass name in the path instead subclass?

2012-08-08 Thread Dheeraj Kumar
AR is activerecord AR::Base is what all active record models inherit from a#b means i'm talking about method b in class a Dheeraj Kumar On Thursday 9 August 2012 at 12:50 AM, Dheeraj Kumar wrote: http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-becomes class User

Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Dheeraj Kumar
You could use a HTML5 solution with a Flash fallback, to be more future-ready. Dheeraj Kumar On Sunday 26 August 2012 at 3:42 PM, Loganathan Sellapa wrote: Yes, but most of the media applications are still depends on Flash only. It will take some sort of time to move on with HTML5

Re: [Rails] Any meetup in india ?

2012-08-26 Thread Dheeraj Kumar
There are meet ups in India. You can find a list at http://rubyusergroups.org/ Bangalore Ruby User Group is the most populated and active. We have meetups every third saturday of the month, and you get to meet a lot of awesome people! Dheeraj Kumar On Sunday 26 August 2012 at 5:08 PM

Re: [Rails] Any meetup in india ?

2012-08-26 Thread Dheeraj Kumar
Did you even check the link I posted? It has links to both Mumbai and Pune RUGs, although it looks like Pune is more active. Dheeraj Kumar On Sunday 26 August 2012 at 9:12 PM, ANIKET KADAM wrote: any chance in mumbai On Sun, Aug 26, 2012 at 8:51 PM, Dheeraj Kumar a.dheeraj.ku

Re: [Rails] Re: Any meetup in india ?

2012-08-26 Thread Dheeraj Kumar
Pune, because of the interesting discussions there. Or wing it to Bangalore for a day :) It's only 5-6 hours :) Dheeraj Kumar On Monday 27 August 2012 at 10:21 AM, thil wrote: Its really gr8. I am new to ruby on rails and I want to know any activities going on Chennai india Thanks

Re: [Rails] Re: A Ruby Book (free to use)

2012-08-27 Thread Dheeraj Kumar
is not trivial to accomplish, but your book sucks. Dheeraj Kumar On Monday 27 August 2012 at 5:31 PM, Karthikeyan A k wrote: OK, its the short form of I Love Ruby. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-08-27 Thread Dheeraj Kumar
work 90% of the time, but it's largely unsupported by the rails community. Dheeraj Kumar On Monday 27 August 2012 at 8:37 PM, Bruce Whealton wrote: Hello all, For some reason, Ruby on Rails is one of the hardest programming languages that I’ve ever tried to get up and running

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-08-27 Thread Dheeraj Kumar
, management consoles like Cpanel, etc are largely not favored by the community. These are just my views and experiences with the Rails ecosystem. YMMV :) Dheeraj Kumar On Monday 27 August 2012 at 8:47 PM, Dheeraj Kumar wrote: Hi Bruce, I can understand the problems you're going through

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-08-27 Thread Dheeraj Kumar
Kumar On Monday 27 August 2012 at 9:12 PM, Colin Law wrote: On 27 August 2012 16:17, Dheeraj Kumar a.dheeraj.ku...@gmail.com (mailto:a.dheeraj.ku...@gmail.com) wrote: Hi Bruce, I can understand the problems you're going through, as I've faced them myself. They stem from some

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-08-27 Thread Dheeraj Kumar
, Rails4 does support live streaming. If you have a question about it, I suggest you start a new thread, so that this thread can continue about new developers and the problems they face. Dheeraj Kumar On Monday 27 August 2012 at 9:26 PM, Dheeraj Kumar wrote: @Colin: Railsready can

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-08-28 Thread Dheeraj Kumar
why not go native on Linux? Dheeraj Kumar On Tuesday 28 August 2012 at 6:45 AM, Bruce Whealton wrote: Hello, Thanks for your feedback. I guess I will have to share with you the problem I am having with Linux installations too. Anyway, I am taking a course on Lynda.com (http

Re: [Rails] Re: A Ruby Book (free to use)

2012-08-28 Thread Dheeraj Kumar
I thought he was trolling too. Then I realized he wasn't. My friends had a pretty good laugh about this.. there are plenty of WTF moments :D Dheeraj Kumar On Tuesday 28 August 2012 at 1:20 PM, Michael Pavling wrote: On 28 August 2012 08:32, Karthikeyan A k li...@ruby-forum.com (mailto:li

Re: [Rails] Re: A Ruby Book (free to use)

2012-08-28 Thread Dheeraj Kumar
Hey I didn't write that! Dheeraj Kumar On Tuesday 28 August 2012 at 6:52 PM, Hasan Diwan wrote: On 28 August 2012 02:16, Dheeraj Kumar a.dheeraj.ku...@gmail.com (mailto:a.dheeraj.ku...@gmail.com) wrote: LOL! All know its absurd, don't u ppl have a sense of humour or something

Re: [Rails] Is it a good idea for me to learn Ruby on Rails?

2012-08-30 Thread Dheeraj Kumar
Like Colin rightly said, first figure out what you want to develop. If you are a beginner with no development experience, it doesn't really matter which one you start with. Dheeraj Kumar On Thursday 30 August 2012 at 5:10 PM, Colin Law wrote: On 30 August 2012 12:24, ANIKET KADAM

Re: [Rails] Is it a good idea for me to learn Ruby on Rails?

2012-08-30 Thread Dheeraj Kumar
Like I said, you're a beginner, so it doesn't matter what you start with. What matters is what you get really good at. Dheeraj Kumar On Thursday 30 August 2012 at 5:38 PM, ANIKET KADAM wrote: i want to develop all type of apps = traditional to Real time On Thu, Aug 30, 2012 at 5:35 PM

Re: [Rails] Is it a good idea for me to learn Ruby on Rails?

2012-08-30 Thread Dheeraj Kumar
Make sure whatever you learn finally, use MongoDB with it. It is web scale. Dheeraj Kumar On Thursday 30 August 2012 at 6:05 PM, ANIKET KADAM wrote: sure On Thu, Aug 30, 2012 at 6:03 PM, Peter Hickman peterhickman...@googlemail.com (mailto:peterhickman...@googlemail.com) wrote

Re: [Rails] Is it a good idea for me to learn Ruby on Rails?

2012-08-30 Thread Dheeraj Kumar
It was a joke, Jordan. Just messing around with a newbie :) Link related: http://www.mongodb-is-web-scale.com/ Dheeraj Kumar On Thursday 30 August 2012 at 6:33 PM, Jordon Bedwell wrote: On Thursday, 30 August 2012 07:41:13 UTC-5, Dheeraj Kumar wrote: Make sure whatever you learn finally

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-09-02 Thread Dheeraj Kumar
Are you sure you ran `rails server` before navigating to localhost:3000 ? did it throw any errors? Dheeraj Kumar On Sunday 2 September 2012 at 11:19 AM, Bruce Whealton wrote: Dheeraj, And others... I am now convinced to use Linux/Ubuntu in my VirtualBox installation. I followed

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-09-02 Thread Dheeraj Kumar
You need to add it to the gemfile and run the bundle command. Dheeraj Kumar On Sunday 2 September 2012 at 4:30 PM, Bruce Whealton wrote: I meant no offense. Please, don't take it that way. Let me explain my post... I had originally intended to use Windows as the environment for running

Re: [Rails] Help getting started: Newbie: Windows and Rails

2012-09-02 Thread Dheeraj Kumar
/rails4/agile-web-development-with-rails Dheeraj Kumar On Sunday 2 September 2012 at 10:23 PM, Bruce Whealton wrote: Bill, First, I really appreciate your help. At the risk of sounding naïve, in response to Dheeraj’s post that “You need to add it to the gemfile and run

Re: [Rails] How to read Microsoft document file in ruby on rails ?

2012-09-16 Thread Dheeraj Kumar
Did you try googling? This was the third link I found. http://deepakprasanna.blogspot.in/2011/06/parsing-pdfdocdocx-content-with-apache.html Dheeraj Kumar On Sunday 16 September 2012 at 3:46 PM, rovin varshney wrote: Hi Walter Lee Davis , Paul Please can u give some code

Re: [Rails] Intro and some Architectual Questions

2012-09-21 Thread Dheeraj Kumar
Explore https://www.ruby-toolbox.com/ Dheeraj Kumar On Saturday 22 September 2012 at 2:15 AM, Jammer Jamski wrote: Hi All, I've arrived at the door of Ruby! I'm a complete noob to Ruby and RoR and looking for some high level advice on things to look at. I'm an experienced .NET system

Re: [Rails] How is the Kernel module an ancestor of Object?

2012-09-26 Thread Dheeraj Kumar
It would be more correct to say that Object includes the Kernel module. see http://ruby-doc.org/core-1.9.3/Object.html Dheeraj Kumar On Thursday 27 September 2012 at 6:10 AM, John Merlino wrote: inheritance chain: Class - Module - Object Kernel.is_a?(Module) # = true Kernel

Re: [Rails] Re: spredsheet_on_rails support only 2003 xls not 2007 2010 xlsx ERROR-OLE2 signature is invalid.

2012-09-28 Thread Dheeraj Kumar
is a resource for that: http://www.catb.org/esr/faqs/smart-questions.html Dheeraj Kumar On Saturday 29 September 2012 at 10:25 AM, Fahim Patel wrote: any one about this On Thursday, September 27, 2012 6:48:57 PM UTC+5:30, Fahim Patel wrote: hi all i wish to upload a spreadsheet file and all

Re: [Rails] why functional test does not get failure?

2012-11-26 Thread Dheeraj Kumar
Add render_views https://www.relishapp.com/rspec/rspec-rails/v/2-12/docs/controller-specs/render-views Dheeraj Kumar On Monday 26 November 2012 at 6:15 PM, Mauro wrote: The test: test should get new do get :new, :room_id = @room.name (http://room.name) assert_template(:ne) end

Re: [Rails] Re: override initialize on ActiveRecord?

2012-12-21 Thread Dheeraj Kumar
Can't you use an after_initialize callback? -- Dheeraj Kumar On Saturday 22 December 2012 at 4:07 AM, Dan Brooking wrote: lol, so basically that means for me, the answer is no :) On Fri, Dec 21, 2012 at 2:05 PM, Crispin Schäffler crispinschaeff...@gmail.com (mailto:crispinschaeff

Re: [Rails] configuring ORACLE db to rails?

2012-12-24 Thread Dheeraj Kumar
https://github.com/rsim/oracle-enhanced -- Dheeraj Kumar On Monday 24 December 2012 at 1:11 PM, rails_fan wrote: hi everyone i'm newer to ruby on rails...for the past few days i used default sqlite db with rails and now im in the situation to use ORACLE db in my upcoming application...can

Re: [Rails] Unable to connect to api.heroku.com

2012-12-24 Thread Dheeraj Kumar
Heroku seems to be online: https://status.heroku.com/ My guess is it's probably a DNS issue on your end. Try switching to OpenDNS or Google DNS -- Dheeraj Kumar On Monday 24 December 2012 at 3:04 PM, thil wrote: Hi , I am trying to deploy java war files using the command heroku

Re: [Rails] Re: configuring ORACLE db to rails?

2012-12-24 Thread Dheeraj Kumar
Try adding ruby-oci8 before activerecord-oracle_enhanced-adapter in the gem file. Also, I guess you'll be fine with the basic package, but I haven't worked with oracle databases, so play around. -- Dheeraj Kumar On Tuesday 25 December 2012 at 11:36 AM, rails_fan wrote: i have tried

Re: [Rails] Re: Bad idea to add/remove associations in after_find

2012-12-25 Thread Dheeraj Kumar
+1 for STI, if an artist cannot be a curator. Roles with CanCan, if an artist can be a curator. -- Dheeraj Kumar On Tuesday 25 December 2012 at 5:44 PM, Frederick Cheung wrote: On Dec 24, 11:28 pm, Paul Olivers li...@ruby-forum.com (http://ruby-forum.com) wrote: I have 2 distinct

  1   2   3   >