Posts by hsgubert • 131 points
3 posts
-
1
votes2
answers49
viewsA: How to use HATBM with multiple models
Yes, you will have to create separate relationships. In total you will have 5 tables: users tags_users tags posts_tags posts Then if you want to consult, for example, all posts that share tags with…
-
1
votes3
answers262
viewsA: How to instantiate a model and get its features by its name in Ruby on Rails
Best solution in my view: Create a single User model and a boolean admin attribute. This way you can make ifs in views: <% if @user.admin? %> ... <% end %> Do not use an attribute called…
-
1
votes1
answer99
viewsA: Deploy with Capistrano
Some Gems need to be compiled locally along with native libraries. The error message is saying that one of these Gems was not installed properly there on your deploy server. The Pistrano deploy has…