From a8a0c40dfae8844162bd472faa9badc38d30d2d5 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 16 Jan 2013 23:08:08 +0100 Subject: acts_as_list --- app/models/route_element.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/models/route_element.rb b/app/models/route_element.rb index 11bb54a..6f6fd3f 100644 --- a/app/models/route_element.rb +++ b/app/models/route_element.rb @@ -3,6 +3,8 @@ class RouteElement < ActiveRecord::Base belongs_to :call_route + acts_as_list :scope => :call_route + def to_s "#{var_in} #{var_out}" end -- cgit v1.2.3 From f7f1785023f6fa52775c7ab2796fc247bf1ab15f Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 16 Jan 2013 23:08:13 +0100 Subject: acts_as_list --- app/models/call_route.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/models/call_route.rb b/app/models/call_route.rb index de0f68a..e423030 100644 --- a/app/models/call_route.rb +++ b/app/models/call_route.rb @@ -6,6 +6,8 @@ class CallRoute < ActiveRecord::Base validates :name, :presence => true + acts_as_list :scope => '`table` = \'#{table}\'' + def to_s name.to_s end -- cgit v1.2.3 From 4ba228de6ecbfa0eeca20f8f7b70aee78fde9385 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 16 Jan 2013 23:08:53 +0100 Subject: position removed --- app/views/call_routes/show.html.haml | 3 --- 1 file changed, 3 deletions(-) (limited to 'app') diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index c5c7397..8be64e6 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -12,9 +12,6 @@ %p %strong= t('call_routes.show.endpoint_id') + ":" = @call_route.endpoint_id -%p - %strong= t('call_routes.show.position') + ":" - = @call_route.position = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } -- cgit v1.2.3