How to use Workling in Rails to increase the speed of the request processing

In ruby on rails application, if your request is taking too much time to process, you can make some part of the code to run in background. For example, In my application , I am sending notifications to owner,watch listers and trackers of a post, if there is any activity on the post. So when […]

Read more "How to use Workling in Rails to increase the speed of the request processing"

Writing SQL update Query using Rails Active Record

Hi, If you feel that updating a record in table using Active Record “update_attributes” or “save” method is taking too much time, or you want write SQL update Query directly. You can try out this. Using save: One way to actually update a student record is, @student=Student.find_by_id(params[:id]) @student.mark+=50 @student.save Using Update attribute: @student=Student.find_by_id(params[:id]) @student.update_attribute(:marks=>@student.marks+50) Instead […]

Read more "Writing SQL update Query using Rails Active Record"