0

I have a bunch of College objects. I print them all out here: http://www.collegeanswerz.com/colleges. (excluding the alphabetical tab. for that I hand coded the HTML)

Take the Rank tab as an example. (The Size and Table tabs are analogous to this code.)

    <div class="tab-content">
        <div id="national_universities2" class="tab-pane active">
            <h3>National Universities</h3>
            <nav class="list">
                <ol>
                    <% @national_university_rank.each do |school| %>
                        <li value="<%= school.us_news_ranking %>"><%= link_to school.name, '/'+school.url %></li>
                    <% end %>
                </ol>
            </nav>
            <br />
            <p class="usnews">Ranks according to <%= link_to "US News", "http://colleges.usnews.rankingsandreviews.com/best-colleges" %>.</p>
        </div>
        <div id="liberal_arts_colleges2" class="tab-pane">
            <h3>Liberal Arts Colleges</h3>
            <nav class="list">
                <ol>
                    <% @liberal_arts_college_rank.each do |school| %>
                        <li value="<%= school.us_news_ranking %>"><%= link_to school.name, '/'+school.url %></li>
                    <% end %>
                </ol>
            </nav>
            <br />
            <p class="usnews">Ranks according to <%= link_to "US News", "http://colleges.usnews.rankingsandreviews.com/best-colleges" %>.</p>
        </div>
    </div>

There are a couple of colleges that I deleted using rails console. They aren't showing up in the development version of this web page, but they are in the production version. Why is this?

Adam Zerner
  • 17,797
  • 15
  • 90
  • 156

1 Answers1

0

I assume you've figured this out already, but it's probably because you deleted them in development which means the development database which is not the same as the production database (in a typical rails setup). Each environment has its own database. If they look the same it's because you (or a previous developer) cloned databases from one environment to another for testing or other purposes.

If you want to remove them from production, you need to get on that machine (wherever it's hosted) and run the same steps you ran in development to remove those records.

mr rogers
  • 3,200
  • 1
  • 19
  • 31
  • No, I actually haven't figured this out yet, but what you said makes sense. I'm using heroku, do you know how I would go about deleting them on my production database? – Adam Zerner Jan 20 '14 at 18:46
  • You can run a rails console on heroku just like you can on your development system. `heroku run console --app=`. Check out heroku's toolbelt/cli documentation https://toolbelt.heroku.com/ for more info – mr rogers Jan 20 '14 at 20:29