forked from jaimeiniesta/planetoid
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sluggable_finder gem for user permalinks; Members paths
- Loading branch information
1 parent
51df0b7
commit 62e3f77
Showing
14 changed files
with
120 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,4 @@ | |
<%= f.submit 'Update' %> | ||
</p> | ||
<% end %> | ||
<%= link_to 'Show', @feed %> | | ||
<%= link_to 'Back', feeds_path %> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,5 +21,4 @@ | |
</p> | ||
<% end %> | ||
|
||
<%= link_to 'Back', feeds_path %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,75 @@ | ||
CREATE TABLE "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "feed_id" integer, "title" varchar(255), "url" varchar(255), "author" varchar(255), "summary" text, "content" text, "published" datetime, "categories" varchar(255), "created_at" datetime, "updated_at" datetime); | ||
CREATE TABLE "feeds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "title" varchar(255), "url" varchar(255), "feed_url" varchar(255), "etag" varchar(255), "last_modified" datetime, "created_at" datetime, "updated_at" datetime); | ||
CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "description" text, "url" varchar(255), "created_at" datetime, "updated_at" datetime); | ||
CREATE TABLE "projects_users" ("project_id" integer, "user_id" integer); | ||
CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL); | ||
CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "blog_url" varchar(255), "twitter_url" varchar(255), "github_url" varchar(255), "created_at" datetime, "updated_at" datetime); | ||
CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version"); | ||
CREATE TABLE `entries` ( | ||
`id` int(11) NOT NULL auto_increment, | ||
`feed_id` int(11) default NULL, | ||
`title` varchar(255) default NULL, | ||
`url` varchar(255) default NULL, | ||
`author` varchar(255) default NULL, | ||
`summary` text, | ||
`content` text, | ||
`published` datetime default NULL, | ||
`categories` varchar(255) default NULL, | ||
`created_at` datetime default NULL, | ||
`updated_at` datetime default NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE `feeds` ( | ||
`id` int(11) NOT NULL auto_increment, | ||
`user_id` int(11) default NULL, | ||
`title` varchar(255) default NULL, | ||
`url` varchar(255) default NULL, | ||
`feed_url` varchar(255) default NULL, | ||
`etag` varchar(255) default NULL, | ||
`last_modified` datetime default NULL, | ||
`created_at` datetime default NULL, | ||
`updated_at` datetime default NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE `projects` ( | ||
`id` int(11) NOT NULL auto_increment, | ||
`name` varchar(255) default NULL, | ||
`description` text, | ||
`url` varchar(255) default NULL, | ||
`created_at` datetime default NULL, | ||
`updated_at` datetime default NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE `projects_users` ( | ||
`project_id` int(11) default NULL, | ||
`user_id` int(11) default NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE `schema_migrations` ( | ||
`version` varchar(255) NOT NULL, | ||
UNIQUE KEY `unique_schema_migrations` (`version`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE `users` ( | ||
`id` int(11) NOT NULL auto_increment, | ||
`name` varchar(255) default NULL, | ||
`email` varchar(255) default NULL, | ||
`blog_url` varchar(255) default NULL, | ||
`twitter_user` varchar(255) default NULL, | ||
`github_user` varchar(255) default NULL, | ||
`created_at` datetime default NULL, | ||
`updated_at` datetime default NULL, | ||
`slug` varchar(255) default NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `index_users_on_slug` (`slug`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090520134455'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090520145728'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090520155946'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090528214708'); | ||
INSERT INTO schema_migrations (version) VALUES ('20090528214049'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090528214708'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090609085237'); | ||
|
||
INSERT INTO schema_migrations (version) VALUES ('20090611075753'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class AddSlugToUsers < ActiveRecord::Migration | ||
def self.up | ||
add_column :users, :slug, :string | ||
add_index :users, :slug | ||
|
||
# Generate slugs for existing users | ||
User.all.each do |user| | ||
user.save | ||
end | ||
end | ||
|
||
def self.down | ||
remove_index :users, :slug | ||
remove_column :users, :slug | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters