Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rails plugin to separate model concerns into multiple files.
branch: master
Failed to load latest commit information.
lib initial commit
tasks initial commit
test initial commit
MIT-LICENSE initial commit
README initial commit
Rakefile initial commit
init.rb initial commit
install.rb initial commit
uninstall.rb initial commit

README

ConcernedWith
=============

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


Copyright (c) 2008 Jake Howerton, released under the MIT license
Something went wrong with that request. Please try again.