(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/sh | |
| # one way (older scala version will be installed) | |
| # sudo apt-get install scala | |
| #2nd way | |
| sudo apt-get remove scala-library scala | |
| wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
| sudo dpkg -i scala-2.11.4.deb | |
| sudo apt-get update |
It's pretty easy to do polymorphic associations in Rails: A Picture can belong to either a BlogPost or an Article. But what if you need the relationship the other way around? A Picture, a Text and a Video can belong to an Article, and that article can find all media by calling @article.media
This example shows how to create an ArticleElement join model that handles the polymorphic relationship. To add fields that are common to all polymorphic models, add fields to the join model.