redmine_my_effort
redmine_my_effort copied to clipboard
Missing custom_fields helper?
I just installed the latest version on my testsystem but found a problem when pushing "Stop".
ActionView::TemplateError (undefined method `custom_field_tag_with_label' for #ActionView::Base:0xb6dcfd28) on line #30 of user_efforts/stop.rhtml: 27: 28:
<%= time_entry.text_field :comments, :size => 60 %>
29: <% @time_entry.custom_field_values.each do |value| %> 30:<%= custom_field_tag_with_label :time_entry, value %>
31: <% end %> 32: <% end %> 33:I added ":helper custom_fields" to fix this, but found another problem afterwards:
NoMethodError (undefined method issue_id' for nil:NilClass): /vendor/plugins/redmine_my_effort/app/controllers/user_efforts_controller.rb:38:in
stop'
Any hints? Thanks!
i know why. i fixed it on my pc. Its missing the redirect_to on stop method.
i made some changes on the stop method. it is like that now:
def stop @effort = UserEffort.find(:first, :conditions => {:user_id => User.current.id}) @issue = Issue.find_by_id(@effort.issue_id) @project = @issue.project
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
#@priorities = Enumeration::get_values('IPRI')
@time_entry = TimeEntry.new
@effort.destroy
redirect_to :back #i've added this line
end