re-add flash messages

This commit is contained in:
Sven Fuchs 2012-10-14 15:07:51 +02:00
parent dd2c469443
commit 270c2fb82d
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ GIT
GIT GIT
remote: git://github.com/travis-ci/travis-core.git remote: git://github.com/travis-ci/travis-core.git
revision: 3154d3fbfa6fe4202ade27f5712927b72dc1673b revision: 310d93a0c6dec233a15264172168fc58fb243f3b
branch: sf-travis-api branch: sf-travis-api
specs: specs:
travis-core (0.0.1) travis-core (0.0.1)

View File

@ -7,7 +7,7 @@ module Travis::Api::App::Responders
def apply def apply
cache_control cache_control
result = normalize(resource.run) result = normalize(resource.run)
flash.concat(resource.messages) if result && resource.respond_to?(:messages) result[:flash] = resource.messages if result && resource.respond_to?(:messages) # TODO should rather happen in the JSON responder, no?
result result
end end

View File

@ -18,7 +18,7 @@ describe Travis::Api::App::Endpoint::Accounts do
'login' => user.login, 'login' => user.login,
'name' => user.name, 'name' => user.name,
'type' => 'user', 'type' => 'user',
'reposCount' => nil 'repos_count' => nil
}] }]
end end
end end