Sha256: 874293c1f02e64c4a3d9d3630604468e1b3a2f3672b22d3585a2b3591e39e3e0
Contents?: true
Size: 1013 Bytes
Versions: 1
Compression:
Stored size: 1013 Bytes
Contents
= concerned_with Simple way to separate model concerns into separate files. Code is from Rick Olson's altered_beast project. === Example # app/models/user.rb class User < ActiveRecord::Base concerned_with :validations, :authentication end # app/models/user/validations.rb class User < ActiveRecord::Base validates_presence_of :name end #app/models/user/authentication.rb class User < ActiveRecord::Base def self.authenticate(name, password) find_by_name_and_password(name, password) end end == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2009 Stephan Kaag. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
concerned_with-0.1.0 | README.rdoc |