OSDN Git Service

Merge branch 'v05' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v05
[pettanr/pettanr.git] / app / models / provider.rb
index f06602d..b1069a0 100644 (file)
@@ -123,4 +123,10 @@ class Provider < ActiveRecord::Base
     Provider.import_urls(urls) {|name, attr| Provider.store(name, attr)}
   end
   
+  def export_url action
+    u = self.demander_url + (self.demander_url[-1] == '/' ? '' : '/')
+    u = URI.join(u, action + '.json')
+    u.to_s
+  end
+  
 end