Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Huber committed Jun 5, 2008
1 parent 9f8ce95 commit a55f3ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
2008-06-05 - Sean Huber (shuber@huberry.com)
* Updated README

2008-06-05 - Sean Huber (shuber@huberry.com)
* Updated README

2008-06-05 - Sean Huber (shuber@huberry.com)
* Added more request tests

Expand Down
32 changes: 16 additions & 16 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Example
-------

class ProjectsController < ApplicationController
before_filter :subdomain_account_required
before_filter :subdomain_account_required
def index
render :text => current_account.subdomain
end
def index
render :text => current_account.subdomain
end
end


Expand All @@ -37,22 +37,22 @@ Request Methods

# Request http://test.example.com:8080/home
class HomeController < ApplicationController
def index
# returns 'example.com:8080'
request.domain_with_port
def index
# returns 'example.com:8080'
request.domain_with_port

# returns 'test.example.com'
request.host_with_subdomain
# returns 'test.example.com'
request.host_with_subdomain
# returns 'testing.example.com'
request.host_with_subdomain('testing')
# returns 'testing.example.com'
request.host_with_subdomain('testing')

# returns 'example.com'
request.host_without_subdomain
# returns 'example.com'
request.host_without_subdomain

returns 'test'
request.subdomain
end
returns 'test'
request.subdomain
end
end


Expand Down

0 comments on commit a55f3ea

Please sign in to comment.