Skip to content

Administrative Tasks

edrex edited this page Dec 26, 2011 · 3 revisions

Cleaning up

Removing topics and tags

Log into the production server, and cd to the directory containing the app instance you are working with.

eric@ankh:/home/activate/stage$ RAILS_ENV=production rails console
> Topic.find_by_name('test')
 => #<Topic id: 20, name: "test", created_at: "2011-12-26 21:12:34", updated_at: "2011-12-26 21:12:34">
> Topic.find_by_name('test').delete
 => #<Topic id: 20, name: "test", created_at: "2011-12-26 21:12:34", updated_at: "2011-12-26 21:12:34">
> Topic.find_by_name('test')
 => nil

Associated events will become unassociated, but won't be deleted.