When you pass an SQL fragment to a finder, join or named scope, ActiveRecord returns read-only results by default.
Use
readonly(false) in your queries to force that results are writable. Ex:
(Rails 3)
User.joins("INNER JOIN `cars` ON `cars`.`user_id` = `users`.`id` AND `cars`.`colour` = 'electric blue'").readonly(false)
Are you looking to make money from your visitors by running popup ads?
ReplyDeleteIn case you are, did you try using Clickadu?