<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,11 @@
 class Api::LinksController &lt; Api::BaseController
   def create
-    @link = Link.find_or_create_by_website_url( params[:link][:website_url] )
+    if params[:website_url].blank?    
+      website_url = params[:link][:website_url]
+    else
+      website_url = params[:website_url]
+    end
+    @link = Link.find_or_create_by_website_url( website_url )
     @link.ip_address = request.remote_ip if @link.new_record?      
 
     if @link.save        </diff>
      <filename>app/controllers/api/links_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>28784511ab4f6badfc97988429c4e9f0d4d1ef66</id>
    </parent>
  </parents>
  <author>
    <name>Robby Russell</name>
    <email>robby@planetargon.com</email>
  </author>
  <url>http://github.com/robbyrussell/rubyurl/commit/fc6784f052856749b2159fb5259d80c6da4208ba</url>
  <id>fc6784f052856749b2159fb5259d80c6da4208ba</id>
  <committed-date>2008-09-02T17:26:46-07:00</committed-date>
  <authored-date>2008-09-02T17:26:46-07:00</authored-date>
  <message>Adding the ability to pass in just website_url without being nested in link for the API</message>
  <tree>9489213295ec7e3e556b46ac53af2e3ad561b71a</tree>
  <committer>
    <name>Robby Russell</name>
    <email>robby@planetargon.com</email>
  </committer>
</commit>
