{"id":13880301,"url":"https://github.com/softace/activerecord-tableless","last_synced_at":"2025-07-16T16:31:30.933Z","repository":{"id":4518016,"uuid":"5657877","full_name":"softace/activerecord-tableless","owner":"softace","description":"Bringing together the different tableless model implementations into a single gem/plugin","archived":false,"fork":true,"pushed_at":"2017-11-13T22:29:22.000Z","size":109,"stargazers_count":113,"open_issues_count":11,"forks_count":41,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-03T21:44:10.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kennethkalmer/activerecord-tableless-models","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-03T11:04:01.000Z","updated_at":"2024-03-09T21:38:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/softace/activerecord-tableless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/softace/activerecord-tableless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softace%2Factiverecord-tableless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softace%2Factiverecord-tableless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softace%2Factiverecord-tableless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softace%2Factiverecord-tableless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softace","download_url":"https://codeload.github.com/softace/activerecord-tableless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softace%2Factiverecord-tableless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524632,"owners_count":23782016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:02:55.672Z","updated_at":"2025-07-16T16:31:30.611Z","avatar_url":"https://github.com/softace.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"ActiveRecord Tableless\n======================\n\n[![Build Status](https://travis-ci.org/softace/activerecord-tableless.png)](http://travis-ci.org/softace/activerecord-tableless)\n[![Dependency Status](https://gemnasium.com/softace/activerecord-tableless.png)](https://gemnasium.com/softace/activerecord-tableless)\n[![Code Climate](https://codeclimate.com/github/softace/activerecord-tableless.png)](https://codeclimate.com/github/softace/activerecord-tableless)\n\nA single implementation of the ActiveRecord Tableless pattern for any\nRails project or other Ruby project that uses ActiveRecord.\n\nWhy, why, why\n-------------\n\nWhy would you ever consider this gem as opposed to ActiveModel.\n\nIt all started in Rails 2 (see History section). In rails 2 ActiveModel did not exists. Nowadays rails 2.x series is no longer supported.\n\nIn Rails 3 there is an Active Model API, where you can use some\nfeatures of Active Record in other classes. Yehuda Katz has written\n[a nice introduction about this](http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/).\n\nIn Rails 4 basic features of the Active Model API can be activated\nby including\n[ActiveModel:Model](http://api.rubyonrails.org/classes/ActiveModel/Model.html)\nin the model. Carlos Antônio has written\n[a nice tutorial about this](http://blog.plataformatec.com.br/2012/03/barebone-models-to-use-with-actionpack-in-rails-4-0/).\n\nHowever neither the Active Model API (Rails 3) nor the\nActiveModel::Model (Rails 4) supports relations and nested attributes.\n\n\nInstallation\n------------\n\nActiveRecord Tableless is distributed as a gem, which is how it should\nbe used in your app.\n\nInclude the gem in your Gemfile:\n\n    gem \"activerecord-tableless\", \"~\u003e 1.0\"\n\n\nSupported Versions\n------------------\n\nSupported ruby version are\n\n  * **2.2.x** series higher than 2.2.2\n  * **2.3.x** series\n\nIf you are using Ruby version \u003c 2.2.2 you can use the gem version \u003c\n2.0 like this\n\n    gem \"activerecord-tableless\", \"~\u003e 1.0.0\"\n\nSupported ActiveRecord versions are\n\n  * **3.0.x** series\n  * **3.2.x** series\n  * **4.1.x** series\n  * **4.2.x** series\n\nIf you are using ActiveRecord 2.3.x series you can use the gem version \u003c\n2.0 like this\n\n    gem \"activerecord-tableless\", \"~\u003e 1.0.0\"\n\nYou may be able to make it work with 3.1.x, but you should expect to\nput some time in it.\n\nTODO\n----\n\n  * Support Rails 5.x series\n\nUsage\n-----\n\nDefine a model like this:\n\n    class ContactMessage \u003c ActiveRecord::Base\n      has_no_table\n      column :name, :string\n      column :email, :string\n      validates_presence_of :name, :email\n    end\n\nYou can now use the model in a view like this:\n\n    \u003c%= form_for :message, @message do |f| %\u003e\n      Your name: \u003c%= f.text_field :name %\u003e\n      Your email: \u003c%= f.text_field :email %\u003e\n    \u003c% end %\u003e\n\nAnd in the controller:\n\n    def message\n      @message = ContactMessage.new\n      if request.post?\n        @message.attributes = params[:message]\n        if @message.valid?\n          # Process the message...\n        end\n      end\n    end\n\nIf you wish (this is not recommended), you can pretend you have a succeeding database by using\n\n    has_no_table :database =\u003e :pretend_success\n\n\nDevelopment\n-----------\n\nTo start develop, please download the source code\n\n    git clone git://github.com/softace/activerecord-tableless.git\n\nInstall development libraries\n\n    sudo apt-get install -y libsqlite3-dev libxml2-dev libxslt-dev\n\nWhen downloaded, you can start issuing the commands like\n\n    gem install bundler -v '~\u003e 1.12.0'\n    bundle install\n    bundle update\n    bundle exec appraisal generate\n    bundle exec appraisal install\n    bundle exec appraisal rake all\n\nOr you can see what other options are there:\n\n    bundle exec rake -T\n\nPublishing gem\n--------------\n\n```\ngem bump -v pre\n```\n\nVerify everything is OK.\n\n```\ngem build activerecord-tableless.gemspec\n```\n\nVerify everything is OK.\n\n```\ngem release -t\n```\n\n\nHistory\n-------\n\nOriginally this code was implemented for Rails 2 by Kenneth\nKalmer. For Rails 3 the need for this functionality was reduced\ndramatically due to the introduction of ActiveModel. But because the\nActiveModel does not support relations and nested attributes the\nexistence of this gem is still justified.\n\nFor a history of technical implementation details feel free to take a\nlook in the git log :-)\n\n\nCopyright\n---------\n\nCopyright (c) Jarl Friis. See LICENSE.txt for\nfurther details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftace%2Factiverecord-tableless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftace%2Factiverecord-tableless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftace%2Factiverecord-tableless/lists"}