Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing custom_fields helper? #1

Open
Remo opened this issue Sep 22, 2009 · 1 comment
Open

Missing custom_fields helper? #1

Remo opened this issue Sep 22, 2009 · 1 comment

Comments

@Remo
Copy link

Remo commented Sep 22, 2009

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:instop'

Any hints? Thanks!

@ilfernandes
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants