changed our syntax so that the find :first commands actually work :)

This commit is contained in:
Devin Howard 2012-11-03 13:57:42 -04:00
parent 77420bcb09
commit c523c17111
3 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ class SessionsController < ApplicationController
@user = User.new
@connor = User.find(555629996)
@map = Map.find(:first, 5)
@map = Map.first(:conditions => [ "id = ?", 5])
if @map
respond_with(@user, @session, location: user_map_url(@connor,@map)) do |format|

View file

@ -40,7 +40,7 @@ class UsersController < ApplicationController
# direct them straight to the metamaps manual map.
@connor = User.find(555629996)
@map = Map.find(:first, 5)
@map = Map.first(:conditions => [ "id = ?", 5])
if @map
respond_with(@user, location: user_map_url(@connor,@map)) do |format|

View file

@ -65,7 +65,7 @@
</div>
<div class="footer">
<% unless Map.find(:first, 7).nil? %>
<% unless Map.first(:conditions => [ "id = ?", 7]).nil? %>
<div class="feedback"><%= link_to "Feedback", user_map_path(User.find(555629996), Map.find(7)) %></div>
<% end %>
<div class="legend">