re-add flash messages
This commit is contained in:
parent
dd2c469443
commit
270c2fb82d
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user