Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Position field #316

jlerpscher opened this Issue · 10 comments

6 participants



A few months ago, I asked for help to use a field 'position' with Typus. Today I have the problem again. I have new actions in typus "Top / Up / Down / Bottom". Unfortunately, I have a beautiful "The action 'position' could not be found for Admin::ProjectsController" message when I try to click it. I have try to add acts_as_list gem but I have still my error.

Thank you


On the required controller you need to include the ActsAsList module:

include Typus::Controller::ActsAstList
@fesplugas fesplugas closed this

This indeed works, however small typo. Should be:

include Typus::Controller::ActsAsList


If I include the Typus::Controller::ActsAsList I get following error on the edit page of my model:
undefined method `model_name' for NilClass:Class
Extracted source (around line 3):
```1: <%= render "form_javascripts" %>
3: <%= form_for @item, :url => options, :html => { :class => "resource", :multipart => true } do |form| %>
5: <%= render "helpers/admin/resources/errors" %>

If I comment out the include, everthing works in the edit action.

Anyone an idea how to fix this?

Does your model includes acts_as_list?


Yes it does. And I already included the gem acts_as_list itself in the Gemfile.


I think that this problem is a little bug in line 6 and 7.

Can be solved adding:

  before_filter :get_object, :only => Whitelist + [:show, :position]
  before_filter :check_resource_ownership, :only => Whitelist + [:position]


  include Typus::Controller::ActsAsList

Ok if I do the tings @spejman said I get following error:
undefined method "move_lower"


@mattherick you have to add acts_as_list in your model in order to have move_* methods in the object.


Ah I already did that, but in the wrong model :-). Thanks, now it works!


This issue is still happening. Confirmed with typus v3.1.10 and acts_as_list v0.1.6. Trick from @spejman works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.