個体識別番号

今はいいけど、すぐに忘れてしまいそうなので。

(ドコモでは)
識別番号を渡すリンク

<a href="http://example.com" utn>...</a>

識別番号を渡すフォーム

<form action="/hoge" utn>
  ...
</form>

Rails側での個体識別番号の取得(on jpmobile)

request.mobile.ident

とりあえずこんなん作った。

# application_helper.rb
def link_to_with_utn(name, options={}, html_options=nil, *params)
  link_to name, options, html_options.merge(:utn => 'utn'), *params
end

def button_to_with_utn(name, options={}, html_options={})
  form_html = button_to name, options, html_options
  form_html.sub /^<form(\s+)/, '<form utn\1'
end

ボタンの方が特にへたれなコードだと思う。