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
~ SELECT `db_tags`.`id`, `db_tags`.`name` FROM `db_tags` INNER JOIN `db_site_tags` ON (`db_tags`.`id` = `db_site_tags`.`tagid`) WHERE (`db_site_tags`.`db_site_id` = 1) GROUP BY `db_tags`.`id`, `db_tags`.`name` ORDER BY `db_tags`.`id` | |
~ SELECT `id`, `name`, `url`, `createtime` FROM `db_sites` WHERE (`id` = 1) ORDER BY `id` LIMIT 1 | |
~ SELECT `db_tags`.`id`, `db_tags`.`name` FROM `db_tags` INNER JOIN `db_site_tags` ON (`db_tags`.`id` = `db_site_tags`.`tagid`) WHERE (`db_site_tags`.`db_site_id` = 1) GROUP BY `db_tags`.`id`, `db_tags`.`name` ORDER BY `db_tags`.`id` |
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
namespace :dev do | |
desc "Rebuild system" | |
task :build => ["db:automigrate","db:create", "db:migrate", :fake ] | |
desc "create fake blog" | |
task :fake do | |
puts "fake blog" | |
DbSite.create!(:name => "DK's Blog", :url => "http://blog.gslin.org", :createtime => Time.now.to_i ) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" | |
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> | |
<channel> | |
<title>出版新聞看板</title> | |
<link>http://www.wawabook.com.tw/comic/0101.php</link> | |
<description></description> | |
<item> | |
<title>GOSICKs(02)遠離夏季的列車 (櫻庭一樹)</title> | |
<link></link> |
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
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\"\n xmlns:trackback=\"http://madskills.com/public/xml/rss/module/trackback/\">\n <channel>\n <title></title>\n <link></link>\n <description></description>\n </channel>\n</rss>" |
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
def index | |
@posts = Post.find(:all) | |
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
def show | |
@post = Post.find(params[:id]) | |
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
def edit | |
@post = Post.find(params[:id]) | |
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
def new | |
@post = Post.new | |
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
def create | |
@post = Post.new(params[:post]) | |
if @post.save | |
flash[:notice] = 'Post was successfully created.' | |
redirect_to blog_path(@post) | |
else | |
render :action => "new" | |
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
def create | |
@post = Post.new(params[:post]) | |
if @post.save | |
flash[:notice] = 'Post was successfully created.' | |
redirect_to blog_path(@post) | |
else | |
render :action => "new" | |
end | |
end |