diff options
author | spag <spag@golwen.net> | 2013-01-19 09:17:41 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-19 09:17:41 +0100 |
commit | bcbfb154a321953fd32696065e6af1bec85f9345 (patch) | |
tree | 559b3554cacb73b29f76b0757fef0205e0b624f2 /app/models/route_element.rb | |
parent | 617118f91bb77aa4cd37dc8ecfd77059818c9cec (diff) |
move methods added
Diffstat (limited to 'app/models/route_element.rb')
-rw-r--r-- | app/models/route_element.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/route_element.rb b/app/models/route_element.rb index 324a26d..94f0f84 100644 --- a/app/models/route_element.rb +++ b/app/models/route_element.rb @@ -16,4 +16,11 @@ class RouteElement < ActiveRecord::Base "#{pattern} => #{var_in} #{var_out}" end + def move_up? + #return self.position.to_i > RouteElement.where(:call_route_id => self.call_route_id ).order(:position).first.position.to_i + end + + def move_down? + #return self.position.to_i < RouteElement.where(:call_route_id => self.call_route_id ).order(:position).last.position.to_i + end end |