You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and assign values to gon in Rails controller and using in angular controller with $scope
In Rails controller
gon.hotel_data = hotel_data
In Angular controller
$scope.hotel = gon.hotel_data
gon variable is accessible in angular controller
But when I write test case for this controller and it shows this error in angular controller when I run test case
ReferenceError: Can't find variable: gon
Kindly let me know how to initialize gon variable in Javascript test case
Thanks
The text was updated successfully, but these errors were encountered:
I wrote these lines in application layout file
and assign values to gon in Rails controller and using in angular controller with $scope
In Rails controller
gon.hotel_data = hotel_data
In Angular controller
$scope.hotel = gon.hotel_data
gon variable is accessible in angular controller
But when I write test case for this controller and it shows this error in angular controller when I run test case
Kindly let me know how to initialize gon variable in Javascript test case
Thanks
The text was updated successfully, but these errors were encountered: