Currently, I am retrieving my current_user.id from Ruby on Rails and attempting to transfer it to my angular controller using an HTML hidden input.
<input type="hidden" ng-model="user_id" value="<%= current_user.id %>"></input>
While debugging, I noticed that my scope is undefined for "$scope.user_id", which is crucial for sending the value to my server.
Could there be a mistake in my approach? Is there a more efficient method available?