I hereby claim:
- I am vintrepid on github.
- I am vintrepid (https://keybase.io/vintrepid) on keybase.
- I have a public key ASAEFjwdDlpvG4RsY0u_oh0Pr47dNNkO8ZZBX4Bh4JA8DQo
To claim this, I am signing this object:
| sudo gem install merb --source http://edge.merbivore.com | |
| Ruby 1.8.6 (ruby -v) | |
| Rubygems 1.3.1 (gem -v) | |
| gem update --system | |
| XCode 3.x | |
| Macports 1.700 (port version) | |
| sudo port selfupdate | |
| sudo port install kcachegrind | |
| sudo port install graphviz |
| sudo easy_install virtualenv | |
| virtualenv tgtut --no-site-packages | |
| cd tgtut | |
| mkdir src | |
| source bin/activate | |
| easy_install sqlalchemy | |
| easy_install sqlautocode | |
| easy_install ipython | |
| easy_install -f ../pypi/ ipython | |
| sqlautocode sqlite:///moviedemo.db -o tables.py |
| # derived from http://railscasts.com/episodes/340-datatables | |
| # handles server side multi-column searching and sorting | |
| class Datatable | |
| delegate :params, :h, :raw, :link_to, :number_to_currency, to: :@view | |
| def initialize(klass,view) | |
| @klass = klass | |
| @view = view | |
| end |
I hereby claim:
To claim this, I am signing this object:
| class ActiveRecord::Base | |
| def combine duplicate, update=false | |
| Rails.logger.info "Combine #{duplicate.name} child records into #{name}..." | |
| tbl = self.class.table_name | |
| self.class.has_many_associations.each do |relation, refl| | |
| assoc = ActiveRecord::Associations::HasManyAssociation.new(duplicate,refl) | |
| scope = assoc.scope | |
| cnt = scope.size | |
| any = cnt > 0 | |
| Rails.logger.info "#{'combine ' if any}#{cnt} #{relation.singularize.pluralize(cnt)}" |