Skip to content
  • azul's avatar
    remove new avatar action, avoid polymorphic path · 07f9eb93
    azul authored
    We can always use the edit action. There is one avatar per entity only.
    Note however that the edit action will either use the current avatar or Avatar.new
    which leads to different urls in the rendered file upload form.
    This way we still have a create and an update action - which makes sense because
    we want to behave different for the first avatar uploaded.
    
    Having one action also makes it easier to pick the right path in avatar_field.
    This way we can avoid both - the polymorphic path that has caused 500's lately
    and a nested if else structure for :new and :edit, group and me.
    07f9eb93