Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boberetezeke/opal-activerecord
An basic implementation of rails active record for use with opaljs
https://github.com/boberetezeke/opal-activerecord
Last synced: 2 months ago
JSON representation
An basic implementation of rails active record for use with opaljs
- Host: GitHub
- URL: https://github.com/boberetezeke/opal-activerecord
- Owner: boberetezeke
- License: mit
- Created: 2014-01-17T00:22:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-04-14T03:28:46.000Z (almost 4 years ago)
- Last Synced: 2024-07-27T01:03:31.765Z (6 months ago)
- Language: Ruby
- Size: 106 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-opal - Opal ActiveRecord - An basic implementation of rails active record for use with opaljs (Uncategorized / Uncategorized)
README
# Opal: ActiveRecord
## Installation
Add this line to your application's Gemfile:
gem 'opal-activerecord'
And then execute:
$ bundle
Or install it yourself as:
$ gem install opal-activerecord
## Usage
Inside your `application.js.rb`:
```ruby
require 'active_record' # to require the whole active record lib
```## Testing
There are two ways to run tests. You can run them inside of MRI
for ease of testing and better debuggability or you can run them
using Opal (as this is how it will actually be used).* To run in Opal do - rake
* To run in MRI do - rspec specIn addition to this, you can run the spec against the real active
record to make sure the tests duplicate the functionality there. To
run that:* run_with_real_active_record=true rspec spec
## Supported Subset of ActiveRecord/ActiveModel
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request## License
opal-activerecord is Copyright © 2014 Steve Tuckner. It is free software, and may be redistributed under the terms specified in the LICENSE file (an MIT License).