Fix poll question with non-underscored locales
Ruby can't have hyphens in method names, so sending something like `title_pt-BR=` would raise an exception.
This commit is contained in:
@@ -45,7 +45,7 @@ class Poll::Question < ActiveRecord::Base
|
||||
self.author = proposal.author
|
||||
self.author_visible_name = proposal.author.name
|
||||
self.proposal_id = proposal.id
|
||||
send(:"title_#{Globalize.locale}=", proposal.title)
|
||||
send(:"#{localized_attr_name_for(:title, Globalize.locale)}=", proposal.title)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user