Displaying 2 results from an estimated 2 matches for "coursescontroller".
2011 Sep 25
4
checkbox use question
Hi,
how can I use checkbox in a form to show all customers from table
customers,
Course Users Customers
========= ========= =============
user_id customer_id Customer_name
I would like to select customers from the checkbox list, then add to the
course table only users of the selected customers.
thanks dani
--
Posted via http://www.ruby-forum.com/.
--
You received
2008 Nov 20
0
pass json data into javascript
Hello from a Ruby on Rails beginner!
I''ve been trying to pass some data to a variable in Javascript by using
json. Seems like the Javascript variable doesn''t receive the data
correctly.
This is the code in controller. @courses variable find the data from
database.
class CoursesController < ApplicationController
def index
@courses = Course.find(:all)
end
end
This is Javascript code in view.
<script type="text/javascript">
var markers=<%= @courses.to_json %>;
</script>
The following code show the data in browser with no problem. That means...