
Just a quick note about rails apps that deal with STEEM account names. Some accounts contain a period (.
), which causes rails apps a bit of trouble. This is because the default for rails apps is to assume that account names containing a period are expressing a format. So an account name of foo.bar
is handled as foo
with the format of bar
.
This can be fixed in Rails 5 using the following route:
Rails.application.routes.draw do
resources :accounts, id: /([^\/])+/, only: [:index, :show]
end
Or, if you're not on Rails 5 yet, add a question mark:
Rails.application.routes.draw do
resources :accounts, id: /([^\/])+?/, only: [:index, :show]
end