Commit d42c029

mo khan <mo@mokhan.ca>
2013-06-24 04:55:25
rename resource to link
1 parent 1c80d6a
app/admin/links.rb
@@ -0,0 +1,3 @@
+ActiveAdmin.register Link do
+
+end
app/admin/resources.rb
@@ -1,3 +0,0 @@
-ActiveAdmin.register Resource do
-  
-end
app/controllers/resources_controller.rb
@@ -1,5 +0,0 @@
-class ResourcesController < ApplicationController
-  def index
-    @resources = Resource.all
-  end
-end
app/models/resource.rb
@@ -1,3 +0,0 @@
-class Resource < ActiveRecord::Base
-  attr_accessible :title, :link, :description
-end
\ No newline at end of file
app/views/resources/index.html.erb
@@ -1,21 +0,0 @@
-<div class="row resources">
-  <div class="span12">
-    <h1>Resources</h1>
-    <table class="table">
-      <thead>
-        <tr>
-          <th>Name</th>
-          <th>Status</th>
-        </tr>
-      </thead>
-      <tbody>
-      <% @resources.each do |resource| %>
-      <tr>
-        <td><%= link_to resource.title, resource.link %></td>
-        <td><%= resource.description %></td>
-      </tr>
-      <% end %>
-      </tbody>
-    </table>
-  </div>
-</div>
spec/controllers/resources_controller_spec.rb
@@ -1,11 +0,0 @@
-require 'spec_helper'
-
-describe ResourcesController do
-  describe :index do
-    it "should load each resource" do
-      resource = Resource.create!(title: 'Facebook', link: "http://www.facebook.com", description: "Everyone posts stuff on FB")
-      get :index
-      assigns(:resources).should include(resource)
-    end
-  end
-end