Skip to content

Commit 4e4e8d5

Browse files
authored
Merge pull request #4 from kimlai/remove-method
Remove the `method` attribute in links
2 parents 69243d1 + eb26964 commit 4e4e8d5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Alterway/Bundle/RestHalBundle/ApiResource/Resource.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ public function __construct(RouterInterface $router)
2626
public function addLink($rel, $route, array $routeParams = array(), array $attributes = array())
2727
{
2828
$generatedRoute = $this->generate($route, $routeParams);
29-
$methods = $this->router->getRouteCollection()->get($route)->getMethods();
3029
$this->hal->addLink(
3130
$rel,
3231
$generatedRoute,
3332
null,
34-
array_merge($attributes, array('method' => reset($methods)))
33+
$attributes
3534
);
3635

3736
return $this;

0 commit comments

Comments
 (0)