IMPORTENT CMD IN RAILS

1.Destroy User:-  User.destroy(id)
2.Role-Admin:- a.update(role: "admin")
3.To find data index:- Member.last
4.To count data in index:- Member.all.count
5.To find out type with table name:- Member.all.where(mystream_id: nil)
6.To Update the field of all table:- Member.all.update(mystream_id: 5)

Comments

Popular posts from this blog

Check Your ageInDays by Javascript