Commit 8512674f250eb38cc198ea8073a3b83ebd8a7334
1 parent
99342898
Exists in
master
and in
29 other branches
ActionItem280: marking TODO to remove ugly hacks
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1686 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
3 additions
and
0 deletions
Show diff stats
app/models/change_password.rb
1 | # TODO: send an e-mail with a hash code to the task after the ChangePassword is creatd -> override messages from #Task | 1 | # TODO: send an e-mail with a hash code to the task after the ChangePassword is creatd -> override messages from #Task |
2 | 2 | ||
3 | +# FIXME remove this workaround | ||
3 | class HumanName | 4 | class HumanName |
4 | def human_name | 5 | def human_name |
5 | @name | 6 | @name |
@@ -16,6 +17,7 @@ class ChangePassword < Task | @@ -16,6 +17,7 @@ class ChangePassword < Task | ||
16 | self[:data] ||= {} | 17 | self[:data] ||= {} |
17 | end | 18 | end |
18 | 19 | ||
20 | + # FIXME ugly workaround | ||
19 | self.columns_hash['login'] = HumanName.new _('Username') | 21 | self.columns_hash['login'] = HumanName.new _('Username') |
20 | self.columns_hash['email'] = HumanName.new _('e-Mail') | 22 | self.columns_hash['email'] = HumanName.new _('e-Mail') |
21 | 23 |
app/models/user.rb
@@ -7,6 +7,7 @@ class User < ActiveRecord::Base | @@ -7,6 +7,7 @@ class User < ActiveRecord::Base | ||
7 | N_('User|Password') | 7 | N_('User|Password') |
8 | N_('User|Password confirmation') | 8 | N_('User|Password confirmation') |
9 | 9 | ||
10 | + # FIXME ugly workaround | ||
10 | def self.human_attribute_name(attrib) | 11 | def self.human_attribute_name(attrib) |
11 | case attrib.to_sym | 12 | case attrib.to_sym |
12 | when :login: return _('Username') | 13 | when :login: return _('Username') |