0

I have to use this in my rails project.

http://nv.github.com/objectDiff.js/

So I added the entire folder to the app/assets/javascript folder and added

//= require objectDiff in the application.js file.

But when I try to access the objectDiff.dif method, it says that there is no such method. I am new to rails. So please let me know if what I am doing is wrong.

0

1 Answer 1

1

Move objectDiff.js into assets/javascripts/
Move objectDiff.css into assets/stylesheets/

Then require the above files in their corresponding application files :

application.js :

//= require objectDiff

application.css :

*= require objectDiff
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but i am stil gettng the same error. I m trying to access the method from my views like this objectDiff.diff(ver1, ver2). But it shows the error "undefined local variable or method 'objectDiff'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.