diff options
author | azul <azul@riseup.net> | 2013-12-22 06:39:37 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-12-22 06:39:37 -0800 |
commit | 4c5851dfac51453571427535419469fe1b73a81d (patch) | |
tree | bc5356220eaca2465bd135f45edf8000d6c254be /DEVELOP.md | |
parent | 5bf1462140a7aa17ea815ccc5105ace6fa878d83 (diff) | |
parent | 665964bcbba69829a4ff1e7d7bd936f90d49b3f7 (diff) |
Merge pull request #131 from elijh/feature/locale-routes
locale prefix support
Diffstat (limited to 'DEVELOP.md')
-rw-r--r-- | DEVELOP.md | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -78,4 +78,21 @@ CouchRest Model behaved strangely when using a model without a design block. So From that point on you should be able to use the standart persistance and querying methods such as create, find, destroy and so on. +## Writing Tests ## +### Locale + +The ApplicationController defines a before filter #set_locale that will set +the default_url_options to include the appropriate default {:locale => x} param. + +However, paths generated in tests don't use default_url_options. This can +create failures for certain nested routes unless you explicitly provide +:locale => nil to the path helper. This is not needed for actual path code in +the controllers or views, only when generating paths in tests. + +For example: + + test "robot" do + login_as @user + visit robot_path(@robot, :locale => nil) + end
\ No newline at end of file |