Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top