Commit 32da97805bbfc11cf806c4b49cb68400ade890aa
1 parent
6a256563
Exists in
master
and in
3 other branches
Fix set_seed method
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
controllers/public/proposals_discussion_plugin_public_controller.rb
@@ -40,8 +40,8 @@ class ProposalsDiscussionPluginPublicController < ApplicationController | @@ -40,8 +40,8 @@ class ProposalsDiscussionPluginPublicController < ApplicationController | ||
40 | 40 | ||
41 | def set_seed | 41 | def set_seed |
42 | #XXX postgresql specific | 42 | #XXX postgresql specific |
43 | - seed_val = profile.connection.quote(cookies[:_noosfero_proposals_discussion_rand_seed]) | ||
44 | - profile.connection.execute("select setseed(#{seed_val})") | 43 | + seed_val = ActiveRecord::Base.connection.quote(cookies[:_noosfero_proposals_discussion_rand_seed]) |
44 | + ActiveRecord::Base.connection.execute("select setseed(#{seed_val})") | ||
45 | end | 45 | end |
46 | 46 | ||
47 | def set_rand_cookie | 47 | def set_rand_cookie |