before_filter :authorize, :only => [:create, :update, :delete]
before_filter :authorize, :only => [:create, :update, :delete]
before_filter :require_public_data, :only => [:create, :update, :delete]
before_filter :check_api_writable, :only => [:create, :update, :delete]
before_filter :check_api_readable, :except => [:create, :update, :delete]
before_filter :require_public_data, :only => [:create, :update, :delete]
before_filter :check_api_writable, :only => [:create, :update, :delete]
before_filter :check_api_readable, :except => [:create, :update, :delete]
# :id parameter. note that this used to return deleted ways as well, but
# this seemed not to be the expected behaviour, so it was removed.
def ways_for_node
# :id parameter. note that this used to return deleted ways as well, but
# this seemed not to be the expected behaviour, so it was removed.
def ways_for_node
- wayids = WayNode.find(:all,
- :conditions => ['node_id = ?', params[:id]]
- ).collect { |ws| ws.id[0] }.uniq
+ wayids = WayNode.where(:node_id => params[:id]).collect { |ws| ws.id[0] }.uniq