thomasklemm edited this page Sep 25, 2012 · 30 revisions
Clone this wiki locally

Ideas to improve the plugin

  • Document the installation in the README
  • Generate named scopes for flags
  • Check has_flags values for being symbols
  • Configurable flags column per has_flags call
  • Test with PostgreSQL, MySQL and SQLite3
  • Document how the bit saving works
  • Explain what a Shih Tzu is ;)
  • Allow multiple has_flags calls per model using different columns (contributed by Ladislav Martincik)
  • Optimize generated sql to allow index to be used by replacing bit operators with IN() conditions (contributed by Joost Baaij)
  • Separate code to not add so many methods to AR
    • Check method visibility
    • Nodoc non-published methods
  • Add rdoc comments in the source
  • Convert plugin to a gem to take advantage of versioning, simple installation and easier use outside rails
  • Provide query optimizing named scope for multiple flags
  • Default values for flag (i.e. add possibility for default true)
  • Provide support for old flags
  • Add an example for a suitable index migration