Whoops!
Move darken() helper method from wiki_helper.rb to application_helper.rb.
This commit is contained in:
parent
979ea7eca0
commit
ad2fab42bd
2 changed files with 5 additions and 5 deletions
|
@ -127,4 +127,9 @@ require 'stringsupport'
|
|||
end
|
||||
end
|
||||
|
||||
def darken(s)
|
||||
n=s.length/3
|
||||
s.scan( %r(\w{#{n},#{n}}) ).collect {|a| (a.hex * 2/3).to_s(16).rjust(n,'0')}.join
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -91,9 +91,4 @@ module WikiHelper
|
|||
{:class => 'navlink', :id => 'rollback', :rel => 'nofollow'})
|
||||
end
|
||||
|
||||
def darken(s)
|
||||
n=s.length/3
|
||||
s.scan( %r(\w{#{n},#{n}}) ).collect {|a| (a.hex * 2/3).to_s(16).rjust(n,'0')}.join
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue