# Sortable\_element helper query

**URL:** <https://www.ruby-forum.com/t/sortable-element-helper-query/161694>\
**Category:** Rails\
**Created:** [March 1, 2009, 7:05am UTC](https://www.ruby-forum.com/t/sortable-element-helper-query/161694 "2009-03-01T07:05:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amita0204](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@amita0204](https://www.ruby-forum.com/u/amita0204)\
**Post date:** [March 1, 2009, 7:05am UTC](https://www.ruby-forum.com/t/sortable-element-helper-query/161694/1 "2009-03-01T07:05:04Z")

</div>

Is it possible to call helper method instead of controller action while  
using sortable\_element helper method?  
Ref:  
[http://api.rubyonrails.org/classes/ActionView/Helpers/ScriptaculousHelper.html](http://api.rubyonrails.org/classes/ActionView/Helpers/ScriptaculousHelper.html)

The url field in the example is like controller/action type. Can we call  
ControllerHelper method instead? Because we need to save the sorted  
element in the database, so my guess was to call a method in a model.  
Any clues?

---

<div class="post-metadata">

**Author:** ![amita0204](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@amita0204](https://www.ruby-forum.com/u/amita0204)\
**Post date:** [March 1, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/sortable-element-helper-query/161694/2 "2009-03-01T12:28:42Z")

</div>

Why not call a controller action which, in turn calls your model  
methods and saves?

Check out Railscast 147 - Ryan explains how to create a quick sortable  
list:

> **[\#147 Sortable Lists - RailsCasts](http://railscasts.com/episodes/147-sortable-lists)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.
