Hi guys!

I want to propose the debate to setup the *RoR convention* for 
*Observers*organization. 

I search in the forum and found some posts about where put observers, but 
no "convention" results "as core" on "*convention over configuration*" 
paradigm. 

Observers for model, sweepers, mailers ... but we can need for 
instrumentation, notifications, audit ...

Here my proposals:

*Proposal A:*
*NOTE*: Considerate include naming sweeper_sufix in the same form as other 
observer; for example: "/app/controller/sweepers/user_*observer*.rb", or 
""/app/controller/*observer*/user_*observer*.rb"
*NOTE*: Considerate include *_*type_observer*.rb for suffix to be 
homogeneous include in sweepers; for example: "user_*model_observer*.rb", 
"user_*swepper_observer*.rb", etc ... *
*
*/app/observers* 
---- */app/models/observers* 
-------- user_*observer*.rb  
-------- product_*observer*.rb 
---- * /app/controllers/sweppers* 
-------- user_*swepper*.rb
-------- product_*sweeper*.rb
---- */app/mailers/observers*
------- user_mailer_observer.rb 
------- product_mailer_observer.rb 

*Proposal B:*
*NOTE*: Considerate "*_*callback*.rb" for suffix to avoid collisions and 
best differentiate with other observers classes
*NOTE*: Considerate include *_*type_observer*.rb for suffix to be 
homogeneous include in sweepers; for example: "user_*model_observer*.rb", 
"user_*swepper_observer*.rb", etc ... 
*NOTE*: Considerate naming "*/app/observers/sweppers" *as* "**
/app/observers/controllers"*
*/app/observers* 
---- */app/observers/models* 
-------- user_*observer*.rb   
-------- product_*observer*.rb 
---- * /app/observers/sweppers* 
-------- user_*swepper*.rb
-------- product_*sweeper*.rb
---- */app/observers/mailers*
------- user_mailer_observer.rb 
------- product_mailer_observer.rb 

Bests

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/Br6yKm1Z7ocJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to