We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a. 【models/group.rb】 has_many :members, through: :group_relationships, source: :user b. 【models/user.rb】 has_many :participated_groups, :through => :group_relationships, :source => :group
The text was updated successfully, but these errors were encountered:
【来自ray16897188】 a是b的一种简单写法,has_many也是rails的函数,它的一个参数是hash哈希类型,给这个类型的变量赋值的语法也可以参考Ruby的参考书。简单来说: options = { :key1 => value1, :key2 => value2 }就是可以简写成: options = { key1: value1, key2: value2 },与上面的正好对应
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: