edavis10 (owner)

Revisions

gist: 193632 Download_button fork
public
Public Clone URL: git://gist.github.com/193632.git
Embed All Files: show embed
redmine_hook_example.rb #
1
2
3
4
5
6
7
8
9
10
11
12
class DefaultAssignProjectHook < Redmine::Hook::ViewListener
 
  # context:
  # * :form - the form builder
  # * :project - the current project
  def view_projects_form(context={})
 
    return content_tag(:p,
                       context[:form].select(:default_assignee_id, context[:project].assignable_users.collect {|user| [user.name, user.id]}, {:include_blank => :none}))
 
  end
end