RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: rept
This is the correct syntax for scoping in rails 4+
scope :with_role, -> role { where("roles_mask & #{2**ROLES.index(role.to_s)} > 0 ") }
No idea why but I needed to change:
$(this).closest('fieldset').hide() into: $(this).parent().hide()
for the removing to work.
Exactly what I was looking for. Sure hope you come back to do more RailsCasts soon Ryan!
Did you find a solution for this? Looking for the same.
Could you share the code? Original isn't available anymore.
Hi, can you share this again, link isn't available.
This is the correct syntax for scoping in rails 4+
No idea why but I needed to change:
$(this).closest('fieldset').hide()
into:
$(this).parent().hide()
for the removing to work.
Exactly what I was looking for. Sure hope you come back to do more RailsCasts soon Ryan!
Did you find a solution for this? Looking for the same.
Could you share the code? Original isn't available anymore.
Hi, can you share this again, link isn't available.