Topic: whois

I want to find availability of some domainname with my app.

Here I have found lib
http://raa.ruby-lang.org/project/whois/

I wish that report present like scaffold error notice, if domain is not available, but I don't have idea how to do this.

Re: whois

I didn't check the link but you should normally make the verification with your controller action (Using the library), then prepare a Message to be rendered in the View.

# Controller
def check_domain
  if Domain.exist(params[:domain]) # Check the right name
                                   # of the method from the Lib,
                                   # and check also what it returns
    @Message = "Sorry, this domain is token"
  else
    @Message = "Available Domain, Order now!"
  end
end

# View
<%= @Message %>