Topic: filter in view with rails_admin
Hi, I am new to rails and I have a question to which I can't find the answer on any website. I am using rails_admin for a easy admin application. The thing is I have a table called owner and a table called computer which are liked to each other in the sense that an owner can have one or multiple computers. So I have linked them by using 'has_many' and 'belongs_to'. That works but when i try to create a new owner i want to see a list of all the computers that have no owner. At the moment I can see all the computers in a multi-select box and then select some and connect them to the owner. But if that computer was already owned, the ownership just changes without me knowing. Is there an easy was to do this. I am hoping I can just add something in my model files because thanks to rails_admin I don't really have a view file. I only have this 'application.html.erb' file:
<!DOCTYPE html>
<html>
<head>
<title>Testapplication</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>Thank you in advance for an answer.