Updating old Polls

Just to add to the Solution:

In my case my site usually has the poll in the first post of the Topic, so a quick way of getting to it on the rails console is this:

myPost = Topic.find_by(id: number-from-topic-url).posts.first.id
myPoll = Poll.find_by(post_id: myPost)

or if you really want to go crazy on one line (scroll right!):

myPoll = Poll.find_by(post_id: Topic.find_by(id: number-from-topic-url).posts.first.id)

Then in this case, of course:

myPoll.chart_type = 'pie'
myPoll.save
4 Likes