Postgresql order by field

We have been using  PostgresSQL  in our new product Quiz Stack. Quiz Stack is a SAAS based  product. Which can  conduct,manage,analysis quizzes.We are using rails and postgresql as our backend.It’s subdomain app and hence we decide to use postgresql schema based approach for storing/querying data. While working on one of the feature It was needed to draw some random fixed questions for each user.So each user has different order of questions which  is maintain for each specific user. In Mysql it’s

Continue Reading

Searching Articles In Refinery Cms

I was working with Refinery cms  some times back.I want blogging facility to my CMS. Refinery has various engine which can easily plug and play including blogging. Blog Engine doesn’t facilitate with searching facility default,but it’s easy to add searching facility. Following Snippet will help you to do this. # app/models/refinery/blog/post.rb module Refinery module Blog class Post < ActiveRecord::Base ........ ....... class

Continue Reading

PubSub Chat Using HTML5 Web Socket and em-websocket

It’s 5 in the morning and i am tired and its a possibility that i may be writing a long post, Last night i asked my self what is it that i have learned in the las t couple of months and out of nothingness i rememberd a VIDEO CHAT APPLICATION which my friend Viren and I worked on. I thought it might be useful for some of you. When we started, we didnt have enough knowledge where to begin

Continue Reading

Managing daemon using daemon-kit

Hey all, In Previous article i have given short bio of ruby daemon using daemon kit. In this post i am writing about how to manage daemon,how to start/stop a daemon from any directory. We can start a daemon using following way. Go to the directory and give the command. or (You know the difference right; To run it in foreground or background respectively.) But consider this possibility, what if you didn’t want to go to the directory where the

Continue Reading

Understanding Daemonkit

Hey all, Many of us knows what daemons are in linux. These are processes or programs that run in background with little or no user intervention. Now we can write daemons in ruby too. And for doing so we can use Daemon-Kit(https://github.com/kennethkalmer/daemon-kit). Now the daemon can do the task continuously or do it at particular interval of time or do it depending on a particular event. Daemon-Kit provides a skeleton to write these different types of daemons with the help

Continue Reading

acts_as_flying_saucer on Rails 3.1 and Heroku

Just quick post how to use acts_as_flying_saucer with rails 3.1 and Heroku. I was testing acts_as_flying_saucer with rails 3.1.It is working fine so far. but when i have added external style sheet it was hanging on dev mode. and later on i figure out it is external style sheet causing an issue. So i precomplied css and then try to generate pdf it is working. Now it is time to test on heroku. I am using cedar stack and ruby

Continue Reading

Conditional GET

I have to admit this . I always fall in love with RAILS each day as I explore it to know how a complex problem can be handle with great ease and with minimum amount of code. That what made me write this post on " Conditional Get Request." For those who aren’t aware of it let me give them some insight in it. Conditional GETs are a feature of the HTTP specification that provide a way for web servers to tell

Continue Reading

Dynamic Report In Ruby On Rails

In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format. Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report. So to fulfill this kind of requirement user editable report which contains Markup + ruby code for

Continue Reading

Site Footer