55
votes
6answers
12k views

Rails CSRF Protection + Angular.js: protect_from_forgery makes me to log out on POST

If the protect_from_forgery option is mentioned in application_controller, then I can log in and perform any GET requests, but on very first POST request Rails resets the session, which logs me out. ...
23
votes
5answers
5k views

Using angularjs with turbolinks

I am trying to use Angularjs framework in my app with turbolinks. After page change it do not initialize new eventlisteners. Is it any way to make it work? Thanks in advance!
5
votes
2answers
6k views

AngularJS: best practice for ensure user is logged in or out using cookieStore

Right now I am building an AngularJS based application on top of Ruby on Rails and using Devise for authentication. I have the server responding properly when a user authenticates successfully and ...
1
vote
1answer
836 views

How to fetch index data in Angular using rails server

I am starting with Angularjs + rails backend and trying to fetch users data from the server - equivalent to to controller/index action in rails. I have followed several tutorials and found this code ...
8
votes
3answers
1k views

can grunt automatically include all my js in index.html?

I'm new to grunt. I'm coming from rails and getting into angular. From what I can see grunt usemin can replace <script src=...> between build directives and replace that with a single minified ...
2
votes
2answers
326 views

Rails 4 Asset Pipeline: Asset missing fingerprint in asset_path from js

I am deploying a Rails 4.0 application which includes HTML partial templates as assets for our front-end javascript framework. Although these templates are part of the asset pipeline and are properly ...
6
votes
2answers
2k views

Javascript error Unknown provider: tProvider <- t after Rails minification Angularjs

My Rails app doesn't work after turned on assets magnification when assets compiled. I converted the Angular controllers to use the bracket notation, and get following error, is there a way to debug ...
2
votes
3answers
2k views

Selective Rails 3.2 asset pipeline compression per file

I'd like to selectively compress some of the javascript files in a Rails 3.2 app, but still have all js assets served from a single bundled file in the production environment. Syntax like this, ...
1
vote
1answer
2k views

is there good Angular Js + rails backend tutorial?

recently I read Micahel Hartl's Ruby on Rails tutorial. It really works for me. Now, I want to make front-end with Angular or Ember JS. I plan to use rails as backend server with json. please ...
6
votes
2answers
3k views

Error: Unknown provider: aProvider <- a

I'm using AngularJS in a Ruby on Rails 3.2.8 project with assets. When I load up my form which is using AngularJS on my development machine I don't have a problem. However when I load the same form ...
5
votes
2answers
994 views

How can we use rails routes with angularjs in a DRY way?

First of all,I would say sorry for my broken English and the broken codes...(many words here come from google translation...so, I'm afraid that I can't make myself clear...so, I paste all the ...
2
votes
3answers
2k views

Rails 3 and Angularjs Origin http://localhost is not allowed by Access-Control-Allow-Origin.

First, let me say that I have tried a ton of solutions that have been posted here. None of them seem to work for me. I realize that my problem is stemming from CORS and my rails app's inability to ...
8
votes
3answers
12k views

angularjs: allows only numbers to be typed into a text box

In angularjs is there any functionality available that allows only numbers to be typed into a text box like
3
votes
2answers
158 views

AngularJS: Use devise with multiple models

I have a rails app using devise with 2 different models corresponding to vastly different roles (no STI - different models altogether). I am planning to move to frontend to AngularJS. Want to know ...
3
votes
4answers
3k views

AngularJS Restful Routing

I'm trying to structure my app using the Restful/Ruby convension /<resource>/[method]/[id]. How I've done it previously when using a server-side MVC framework like CodeIgniter was to dynamically ...
3
votes
2answers
2k views

angularjs with client side haml

I've just started using AngularJS with my Rails app and as I'm used to using haml templates within Rails I would like to do the same with AngularJS on the client side. Problem is I don't know where to ...
1
vote
1answer
396 views

How to correct set root route in Rails 4 for AngularJS?

I have a troubles with integrating Rails routing with AngularJS. When I go to "localhost:3000" in browser input, it redirect me to the "localhost:3000/#/auth/sign_in" but 'sign_in' template not ...
1
vote
2answers
541 views

Rails will_paginate gem with angular.js to do pagination

Context: I have a Rails backend serving as an API to an Angular.JS front-end application. Task: I want to retrieve all of the records of different species of "dinosaurs" from the Rails backend. ...
6
votes
3answers
4k views

Rails 3 + angularjs + minification does not work in production: Unknown provider: eProvider

I've followed all the instructions I can find for fixing minification, e.g. var MyController = function(renamed$scope, renamedGreeter) { ... } MyController.$inject = ['$scope', 'greeter']; and ...
2
votes
1answer
2k views

TypeError: object is not a function - fetching collection data using Angular / rails

ok this is the last question from todays trilogy of learning Angular: part1 part2 I am getting to following error(when trying to select user in view: TypeError: object is not a function at ...
1
vote
2answers
1k views

rails + angularjs loading values into textfields on edit

When using AngularJS with a rails application I've hit a problem when editing records the value of the text fields is set to blank. Is there a way to tell AngularJS to use the values rails gives the ...
0
votes
3answers
40 views

AWS EC2 micro and medium instances with same performance?

Im developing an AngularJS (frontend) and Rails API (backend) project. My development environment has been running on an AWS EC2 micro instance. Now, its time to go live, so I chose a medium instance. ...
0
votes
0answers
88 views

Rails App to Angular: HAML + Rails Helpers

I'm trying to move my full-stack rails app over to Angular a page at a time. I'm using ui-router (https://github.com/angular-ui/ui-router) and angular-rails-templates ...
0
votes
2answers
55 views

Store status between forms in AngularJS?

I am going to try to be as specific as I can. This is what I am trying to accomplish: I want to be able to show a User, which kind of shoes fit its needs. The user will be shown 4 forms, one at a ...
0
votes
0answers
31 views

Having trouble showing data in angular rails app

I am trying to build a small rails app with angular on the front end. Right now, I am able to create a valid new object but cannot show those objects on the index view. Here is the current index ...
0
votes
2answers
564 views

Heroku Rails CORS issue

I have built a rails restful service that I host on Heroku and a Angular client which I am trying to run from my local machine. Eventually this client will be run added to a phonegap project. However, ...
0
votes
3answers
271 views

Rails route params in angular

I'm playing around with angular in my rails app. This is not a single page app, i'm just using angular in a few places. I'm having a hard time getting route params from the uri to use in my ...