Sunday, February 16, 2014

Ruby/Rails - How to Create a Class and Access it from the Controller - Stack Overflow

Ruby/Rails - How to Create a Class and Access it from the Controller - Stack Overflow: "You should put location.rb wherever you feel it makes the most sense. Having it at app/models/location.rb will ensure that it's automatically required when your app starts, but some people expect that classes in app/models are backed by ActiveRecord.

You could also put it under lib/ if you prefer."



'via Blog this'

No comments:

Post a Comment