Commit ee38c957

mo k <mo@mokhan.ca>
2012-08-07 12:50:12
add artists tab and remove lat/long from profiles#index.
1 parent 14376c0
Changed files (3)
app/controllers/search_controller.rb
@@ -6,7 +6,6 @@ class SearchController < ApplicationController
       else
         sql = "%"+params[:q]+"%"
         @creations = Creation.where("upper(name) like upper(?) OR upper(story) like upper(?)", sql, sql).page(params[:page]).per(8)
-        ## @creations = Creation.search(params[:q], :include => :user, :match_mode => :extended, :star => true).page(params[:page]).per(6)
         @members = User.where("upper(name) like upper(?)", sql).page(params[:page]).per(8)
         @search = params[:q]
         format.html
app/views/profiles/index.html.erb
@@ -10,8 +10,6 @@
           <th></th>
           <th>name</th>
           <th>location</th>
-          <th>latitude</th>
-          <th>longitude</th>
           <th>twitter</th>
           <th>facebook</th>
           <th>website</th>
@@ -33,8 +31,6 @@
             </td>
             <td><%= link_to profile.name, profile_path(profile) %></td>
             <td><%= profile.city %></td>
-            <td><%= profile.latitude %></td>
-            <td><%= profile.longitude %></td>
             <td><a href="<%= profile.twitter %>"><%= profile.twitter %></a></td>
             <td><a href="<%= profile.facebook %>"><%= profile.facebook %></a></td>
             <td><a href="<%= profile.website %>"><%= profile.website %></a></td>
app/views/shared/_header.html.erb
@@ -12,6 +12,7 @@
           <input name="q" type="text" class="search-query" placeholder="Search" />
         <% end %>
         <ul class="nav">
+          <li><%= link_to 'Artists', profiles_path %></li>
           <li class="dropdown">
             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Categories<b class="caret"></b></a>
             <ul class="dropdown-menu">