22 Mar, 2016

1 commit

  • plugin-hotspot: dinamic hotspot for models callbacks
    
    With this, every model that includes Noosfero::Plugin::HotSpot will
    provide callbacks hotspots for plugins to answer. The current callbacks
    included are {after,before}_{create,destroy,save}.
    
    So if a plugin wants to do something on a comment after_save, it should
    define a hotspot somewhat like this:
    
      def comment_after_save_callback(comment)
        <code-goes-here>
      end
    
    Obviously, the callback provides the object in context as parameter.
    
    This will replace the problematic common practice of creating a
    lib/ext/my_model.rb and injecting the callbacks inside the class which
    bypass the enabled plugins logic.
    
    Signed-off-by: Rodrigo Souto <rodrigo@colivre.coop.br>
    Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
    
    See merge request !810
    Rodrigo Souto
     

21 Mar, 2016

3 commits

  • Joenio Costa
     
  • Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
    Signed-off-by: Joenio Costa <joenio@colivre.coop.br>
    Marcos Pereira
     
  • With this, every model that includes Noosfero::Plugin::HotSpot will
    provide callbacks hotspots for plugins to answer. The current callbacks
    included are {after,before}_{create,destroy,save}.
    
    So if a plugin wants to do something on a comment after_save, it should
    define a hotspot somewhat like this:
    
      def comment_after_save_callback(comment)
        <code-goes-here>
      end
    
    Obviously, the callback provides the object in context as parameter.
    
    This will replace the problematic common practice of creating a
    lib/ext/my_model.rb and injecting the callbacks inside the class which
    bypass the enabled plugins logic.
    
    Signed-off-by: Rodrigo Souto <rodrigo@colivre.coop.br>
    Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
    Rodrigo Souto
     

17 Mar, 2016

2 commits


16 Mar, 2016

5 commits


15 Mar, 2016

4 commits


12 Mar, 2016

1 commit


10 Mar, 2016

21 commits


09 Mar, 2016

3 commits