2
votes

I got a problem... I had to use active admin for create a custom page -_-.. So I can't interact with my controller from my view.

So I've create many checkbox like this in my view,

input type="checkbox" class="filter" autocomplete="off" name="lundi" value="0" checked>Lundi

I'd like to use them in the same view I want to know if the checkbox is checked or not. So if someone ad a tricks? I'm a new user of rails.

1

1 Answers

0
votes

You can use jQuery to check if checkbox is checked or not and do some thing on that decision, send ajax call or something else.

if ($("[name='lundi']").is(":checked")){
    console.log("Do Something.");
}

Let me know if you need further help.