small refactorings

This commit is contained in:
Reinier Balt 2012-07-12 13:14:21 +02:00
parent 7d0c716366
commit 82bb67f518
6 changed files with 61 additions and 130 deletions

View file

@ -1,14 +1,5 @@
module ContextsHelper
def get_listing_sortable_options
{
:tag => 'div',
:handle => 'handle',
:complete => visual_effect(:highlight, 'list-contexts'),
:url => order_contexts_path
}
end
def link_to_delete_context(context, descriptor = sanitize(context.name))
link_to(descriptor,
context_path(context, :format => 'js'),
@ -21,8 +12,7 @@ module ContextsHelper
end
def link_to_edit_context (context, descriptor = sanitize(context.name))
link_to(descriptor,
url_for({:controller => 'contexts', :action => 'edit', :id => context.id}),
link_to(descriptor, edit_context_path(context),
{
:id => "link_edit_#{dom_id(context)}",
:class => "context_edit_settings icon"