Skip to content

Commit

Permalink
friendly id, fix some db
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Apr 21, 2009
1 parent 6d6a1f1 commit a4aa6eb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 740 deletions.
1 change: 1 addition & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
config.gem "giraffesoft-is_taggable", :lib => "is_taggable"
config.gem "nofxx-formtastic", :lib => "formtastic"
config.gem "nofxx-money", :lib => "money"
config.gem "friendly_id"

# config.load_paths += %W( #{RAILS_ROOT}/extras )
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
Expand Down
6 changes: 5 additions & 1 deletion db/migrate/20090319011550_create_provinces.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ class CreateProvinces < ActiveRecord::Migration
def self.up
create_table :provinces do |t|
t.references :country
t.string :name
t.string :name, :null => false
t.string :abbr, :limit => 3

t.timestamps
end

add_index :provinces, :name, :unique => true
add_index :provinces, :abbr, :unique => true
end

def self.down
Expand Down
7 changes: 4 additions & 3 deletions db/migrate/20090319011615_create_countries.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
class CreateCountries < ActiveRecord::Migration
def self.up
create_table :countries do |t|
t.string :name
t.string :abbr
t.string :name, :null => false
t.string :abbr, :limit => 3

t.timestamps
end

add_index :countries, :name
add_index :countries, :name, :unique => true
add_index :countries, :abbr, :unique => true
end

def self.down
Expand Down
40 changes: 0 additions & 40 deletions vendor/plugins/permalink_fu/README

This file was deleted.

1 change: 0 additions & 1 deletion vendor/plugins/permalink_fu/init.rb

This file was deleted.

195 changes: 0 additions & 195 deletions vendor/plugins/permalink_fu/lib/permalink_fu.rb

This file was deleted.

Loading

0 comments on commit a4aa6eb

Please sign in to comment.