Based on a table employees, I created a view in my MySQL database called Employees_by_gender:
select count(gender_id) AS "Number of Employees",gender_id AS "Gender" from employees group by gender_id;
mysql> select * from Employee_by_gender;
+--------+---------------------+
| Gender | Number of Employees |
+--------+---------------------+
| 1 | 3890 |
| 2 | 1087 |
+--------+---------------------+
How do I render the output of this database view in a client side table? I’ve been using “dataTables bootstrap rails” for all my normal tables rendering.

How can I get this data in a table-like display?
I’m not sure on the specifics of dataTables, but you can create an ActiveRecord model for the view as if it were a normal (read-only) table:
However, you are going to have a very hard time unless you rename your view column names to not contain spaces.
If you must keep the spaces in the column names, follow the advise here:
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.ruby/SNZNQu_h92w