ruby on rails - Fill instance variable with all Users from table -
i want fill instance variable groups names.
how do this?
@groups = group.name.all obviously, doesn't work. don't know search for. table called groups, field name. doing different controller can see groups if use
@groups = group.first.name so associations seem work.
@groups = group.all.map(&:name)
Comments
Post a Comment