How about moving this into a helper method like

```
def like_unlike_button
#Place the logic here.
# we might need to check current_like here as wel instead in controller.
end
```