Good afternoon friends of stackoverflow.
I have my next question in rails I have the following hash inside an array. @permissions_crud_hash = [:name => name_, :c => c, :r => r, :u => u, :d => d]
@permissions_crud.push @permissions_crud_hash
which has something like that as an example.
[{:name=>["Administracion"], :c=>[true], :r=>[true], :u=>[false], :d=>[false]}], [{:name=>["Permisos"], :c=>[true], :r=>[true], :u=>[true], :d=>[true]}]]
What I want to know is how to get out of that hash every example value I want to take if there is a name of "Permissions" inside that hash and each value such as c, r, u, d.
An example that I try to do but does not give me is this.
if @permissions_crud.include?(['Permisos'])
if '@permissions_crud.include?(['Permisos'][:c=>true])'
Thank you very much.