mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 09:24:22 +01:00
The contexts controller gets more RESTy. It now supports XML, RSS, ATOM, HTML and plain text views of the contexts list.
Changes include:
* Update the URL on the Feeds page to use /contexts.rss or /contexts.txt instead of FeedController? link
* Add created_at and updated_at timestamps to contexts table to support ATOM feeds
Notes:
* This will break previous context listing feed subscriptions.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@423 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
6045a7a986
commit
fcab16a5c2
15 changed files with 202 additions and 40 deletions
13
tracks/db/migrate/027_add_context_timestamps.rb
Normal file
13
tracks/db/migrate/027_add_context_timestamps.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class AddContextTimestamps < ActiveRecord::Migration
|
||||
|
||||
def self.up
|
||||
add_column :contexts, :created_at, :timestamp
|
||||
add_column :contexts, :updated_at, :timestamp
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :contexts, :created_at
|
||||
remove_column :contexts, :updated_at
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -2,13 +2,15 @@
|
|||
# migrations feature of ActiveRecord to incrementally modify your database, and
|
||||
# then regenerate this schema definition.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 26) do
|
||||
ActiveRecord::Schema.define(:version => 27) do
|
||||
|
||||
create_table "contexts", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "hide", :integer, :limit => 4, :default => 0, :null => false
|
||||
t.column "position", :integer, :default => 0, :null => false
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "hide", :integer, :limit => 4, :default => 0, :null => false
|
||||
t.column "position", :integer, :default => 0, :null => false
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "created_at", :datetime
|
||||
t.column "updated_at", :datetime
|
||||
end
|
||||
|
||||
add_index "contexts", ["user_id"], :name => "index_contexts_on_user_id"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue