It is very easy to associate an image with a model using ruby console, given you are associating image to the model using paperclip. Here is what you are gonna do url=”http://golygon.com/image_url.png” file = open url //Ruby will fetch the image using HTTP on your server @user.photo = file // User model uses paperclip to […]
* Size (rails function) is more intelligent than count (ruby function) * Notice that when you counter cache, size makes only one call to db as opposed to count which does 2 queries. 1.9.2-p320 :057 > ParentModel.find(5765).childmodel.count RequestedTrip Load (0.3ms) SELECT `parent_models`.* FROM `parent_models` WHERE (`parent_models`.`id` = 5765) ORDER BY parent_models.created_at desc LIMIT 1 SQL […]
This blog is for marketing novices to demonstrate how effective is mobile marketing with some numbers. Best rate one can get for sending SMS in India – 8 paise per SMS for minimum of 1 lakh SMS. In this case database of phone numbers is provided by the service provider. We did our tie up […]
Sphinx is open source search server used for full text search, we have used it with Rails and MySql database. Why Sphinx: Blazingly fast indexing and searching Variety of Text Processing features which are easy to adapt as per Application. Scalling: It can scale up to millions of queries per day. Performance: Sphinx indexes up […]
There is no excerpt because this is a protected post.
I use Amazon EC2 infrastructure to run my Ruby on Rails application and lately the load time for my application has gone in minutes, actually couple of minutes. After some googling I realized that it does not matter much if I have lots of models and controllers in my code. Most of the time consumed […]
Anurag Rawat joined as as our Sales and Marketing go-to-guy for 2 months from IIM Calcutta and today was his last day before he joins his new job in Boston Consulting Group. Team went out for a dinner and Anurag was more than willing to treat us 😀 Had some nice get together and lot […]
Source code and sample available at: https://github.com/prabgupt/youtube_video_upload_plugin Usage: Please note that sample is available for RoR3 but it can be easily converted for any underlying platform. Refer README in git repo above to know how to run it in RoR3. To see how to tweak code to use it for any other platform, keep reading the […]