lets handle the 404 even in development and test, it makes the code simpler and closer to the production env
fixed spec
migrated state related scopes from project to with_state provided by state_machine