For some reason when I visit my index action on my rails application I get weird results. When its the first time i visit it, the results are as excpected, however, if I click on a link that takes me to another page and then press the back button, I get json results in my webpage verse HTML.
Here is my controller:
class UsersController < ApplicationController
respond_to :html, :json
def index
@users = User.all
respond_with(@users) do |format|
format.json {
render :json => @users.to_json(:methods => :available)
}
end
end
end