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

Error with method sort and todoable #58

Open
ghost opened this issue Jul 31, 2012 · 0 comments
Open

Error with method sort and todoable #58

ghost opened this issue Jul 31, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 31, 2012

Hi,

Thank you for your great plugin!
I got the following error with your plugin on my Redmine:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ActionView::TemplateError (undefined method `sort' for nil:NilClass) on line #6 of vendor/plugins/redmine_todos_plugin/app/views/todos/_root_todos.html.erb:
 <% raise unless parent_object %>

     <ul class="todos root" id="<%= TodosController::UL_ID + 'root' %><%='not-editable' unless editable %>">
       <% for todo in todos.sort{|a,b| a.position <=> b.position} %>
           <%= render :partial => 'todos/todo_li', :locals => { :todo => todo, :editable => editable }%>
       <% end %>
     </ul>


    vendor/plugins/redmine_todos_plugin/app/views/todos/_root_todos.html.erb:6
    vendor/plugins/redmine_todos_plugin/app/views/todos/index.html.erb:19
    vendor/plugins/redmine_todos_plugin/app/controllers/todos_controller.rb:109:in `create'

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

and

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ActionView::TemplateError (undefined method `todoable' for nil:NilClass) on line #5 of vendor/plugins/redmine_todos_plugin/app/views/todos/_new_todo.html.erb:
#New todo: partial for creating a new todo.
#requires:
#   todo : a new Todo object
  parent_object = todo.todoable
  raise unless parent_object

%>

    vendor/plugins/redmine_todos_plugin/app/views/todos/_new_todo.html.erb:5
    vendor/plugins/redmine_todos_plugin/app/views/mytodos/index.html.erb:11
    vendor/plugins/redmine_todos_plugin/app/controllers/todos_controller.rb:109:in `create'

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Could you please help me fix them?

Thanks and regards,

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

0 participants