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
➜ domaincrawler go run bug.go | |
2014/04/15 00:17:00 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:04 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:07 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:09 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:11 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:14 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
2014/04/15 00:17:16 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil> | |
➜ domaincrawler cat bug.go |
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
class CreateComments < ActiveRecord::Migration | |
def change | |
create_table :comments do |t| | |
t.string :name | |
t.string :url | |
t.string :comment | |
t.integer :picture_id, :null => false | |
t.timestamps | |
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
class CommentsController < ApplicationController | |
def create | |
picture = Picture.find(params[:picture_id]) | |
@comment = picture.comments.new(params[:comment])) | |
if @comment.save | |
flash[:success] = "Your comment has been added." | |
redirect_to picture_path(picture) | |
else |
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
class CommentsController < ApplicationController | |
def create | |
picture = Picture.find(params[:picture_id]) | |
@comment = picture.comments.new(params[:comment]) | |
if @comment.save | |
flash[:success] = "Your comment has been added." | |
redirect_to picture_path(picture) | |
else |
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
resources :pictures do | |
resources :comments, :only => ['create', '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
class CommentsController < ApplicationController | |
def create | |
picture = Picture.find(params[:picture_id]) | |
@comment = picture.comments.new(params[:comment]) | |
if @comment.save | |
flash[:success] = "Your comment has been added." | |
redirect_to picture_path(picture) | |
return |
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"> | |
<channel> | |
<title>Comments</title> | |
<description>Comments feed for the picture Fireworks Logo</description> | |
<item> | |
<title>Tom Aisthorpe</title> | |
<description>I suck donkey dick.</description> | |
<pubDate>2011-10-24 21:48:45 UTC</pubDate> | |
</item> |
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
class Comment < ActiveRecord::Base | |
include Sanitize | |
belongs_to :picture | |
validates :name, :presence => true | |
validates :comment, :presence => true, :length => { :in => 5..300 } | |
before_save :strip_html | |
private |
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
w = Whois::Client.new | |
uninitialized constant WhoisController::Whois |
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
Registrant: #<struct Whois::Record::Contact id=nil, type=1, name="Mumbo Design", organization="139 town street", address="earlsheaton", city="dewsbury", zip="8ja", state="wf12", country="United Kingdom", country_code=nil, phone=nil, fax=nil, email=nil, created_on=nil, updated_on=nil> |
OlderNewer