重构bid_helper,contest_helper以及application_helper中共同用到的方法
This commit is contained in:
parent
907960fe75
commit
2f709c92ba
|
@ -708,6 +708,14 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# Redmine links
|
||||
#
|
||||
# Examples:
|
||||
|
|
|
@ -143,12 +143,12 @@ module BidsHelper
|
|||
people.include?(User.current)
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
|
||||
end
|
|
@ -157,14 +157,14 @@ module ContestsHelper
|
|||
people.include?(User.current)
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# tmp={"" => ""}
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
def select_option_app_helper options
|
||||
tmp = Hash.new
|
||||
options.each do |option|
|
||||
|
|
|
@ -14,13 +14,13 @@ module SoftapplicationsHelper
|
|||
content_tag('div', content, :class => "tabs")
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue