I have content management system for an iOS app built with rails. Right now there a are three different types of content. The first two are just strings uploaded into a textfield by the user. One is twitter handles and hashtags, the other is URLs. The second type is photos. 

The user can upload as many individual instances of these types content as he/she wants to given a feed which will is the then passed to the iOS app via an API call to display. 

The current approach I am using is to have Feed, Picture, Twitter, and Webpage models. When the user crates a new Feed, they then associate the appropriate content with that feed via a one to many relationship between each Feed instance it's content instances. 

When it comes time to display to content the user has uploaded, a GET request for a given stream is generated and the Feed model then does the following awful thing determine what type of content should be shown: 

 def Feed.get_content_for_feed(feed_id)
    return self.map_type_to_class(feed_id).get_content_for_feed(feed_id)
  end

  private

  def Feed.map_type_to_class(feed_id)
    feed_type_id = Feed.find(feed_id).feed_type_id
    not_yet_implemented = nil
    case stream_type_id
      when 1
        return Webpages
      when 2
        return Pictures
      when 3
        return not_yet_implemented
      when 4
        return Twitter
      when 5
        return not_yet_implemented
      when 6
        return not_yet_implemented
      when 7
        return not_yet_implemented
      when 8
        return not_yet_implemented
      else
        return nil

    end
  end


Then each content class implements a get_content_for_feed method to return the content:

def Twitter.get_content_for_feed(feed_id)
    tweet_urls = self.where(:feed_id =&gt; feed_id.to_i)
    if tweet_urls.empty?
      return []
    else
      return tweet_urls
    end
  end


So it just returns the appropriate class. This works, but I know that it is wrong, but I am not sure what I would be doing. 


Question: Does one need a master's in math before taking a PhD in math in Europe?
Answer: I'd say that one would need a Master's in Math or its equivalent. Then the question becomes, is your degree in Mathematical Finance an equivalent."

Hopefully, you will have had the core courses in mathematics such as real and complex analysis and advanced calculus. Perhaps your mathematical Finance degree will differ from a true math degree in "engineering type" applications, such as stochastic partial differential equations. If that is the case, you may be ok. Perhaps, at worst, you need to take 2-3 "traditional" math courses as a special student to make up for what you lack.

If you lack a traditional core curriculum, that would be different of course. Ultimately, it is for the faculties of the schools you apply to, to decide. And there is no one university "monolith" in Europe, only numerous schools, with meaningful variations in their admissions criteria.