sunecho307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2013-Jul-07 12:45 UTC
[Rails] How to access the Var or function from a Javascript file in a rails function?
Hi! I am supposed to process the specified data in my database.So this is what i am doing. First, I get the "id" attribute of the objects that i will use by checkbox. Then, I will search the database to get the objects according to the "id" list. But, here is my problem, I can get the "id" list, but I don;t know how to get the objects thtough the list, for the function"getPendingList" to get "id" list is in the "js" file, the function "pendingAll(list)" to get the object is a rails helper function, when i call back the "getPendingList" like " pendingAll( getPendingList) ",it says can''t find the getPendingList. Any advice will be appreciated, thank you~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d059fe3a-41fb-4d43-96be-a7d4b0a41682%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2013-Jul-07 17:27 UTC
Re: [Rails] How to access the Var or function from a Javascript file in a rails function?
On 7 July 2013 13:45, <sunecho307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi! I am supposed to process the specified data in my database.So this is > what i am doing. First, I get the "id" attribute of the objects that i will > use by checkbox. Then, I will search the database to get the objects > according to the "id" list. > But, here is my problem, I can get the "id" list, but I don;t know how to > get the objects thtough the list, for the function"getPendingList" to get > "id" list is in the "js" file, the function "pendingAll(list)" to get the > object is a rails helper function, when i call back the "getPendingList" > like " pendingAll( getPendingList) ",it says can''t find the getPendingList. > Any advice will be appreciated, thank you~I am afraid I, for one, cannot make any sense of your question. Firstly, are you an experienced Rails developer? If not then I suggest working right through a good tutorial such as railstutorial.org (which is free to use online). Then, if you still cannot answer your own question try again to ask the question and show us the section of code that is not working (not the whole app, just the few lines around the problem). Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsJDJgbpW2v5B7w%3DnSAt-e_%2BzOw52ubwv8PJyjCA_ssBQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.