mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
small refactorings
This commit is contained in:
parent
7d0c716366
commit
82bb67f518
6 changed files with 61 additions and 130 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue