##// END OF EJS Templates
Add a second action menu to IssuesController#show. (#4331)...
Add a second action menu to IssuesController#show. (#4331) Will have the update, log time, watch, copy, etc buttons. Had to rework how the watchers button works since it requires a unique DOM id for the Ajax response. Also modified the WatchersController to be able to replace multiple sections of the page, e.g. two Watch links. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3119 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2824:b887cef7af15
r3005:e02da72947d2
Show More
object_daddy_helpers.rb
33 lines | 869 B | text/x-ruby | RubyLexer
/ test / object_daddy_helpers.rb
module ObjectDaddyHelpers
# TODO: The gem or official version of ObjectDaddy doesn't set
# protected attributes so they need to be wrapped.
def User.generate_with_protected!(attributes={})
user = User.spawn(attributes) do |user|
user.login = User.next_login
attributes.each do |attr,v|
user.send("#{attr}=", v)
end
end
user.save!
user
end
# Generate the default Query
def Query.generate_default!(attributes={})
query = Query.spawn(attributes)
query.name ||= '_'
query.save!
query
end
# Generate an issue for a project, using it's trackers
def Issue.generate_for_project!(project, attributes={})
issue = Issue.spawn(attributes) do |issue|
issue.project = project
end
issue.tracker = project.trackers.first unless project.trackers.empty?
issue.save!
issue
end
end