MotionModel
MotionModel copied to clipboard
Simple Model and Validation Mixins for RubyMotion
For a model such as ```ruby class Icon include MotionModel::Model include MotionModel::ArrayModelAdapter columns( name: :string ) belongs_to :record, polymorphic: true end ``` The following raises a classify exception: ```ruby widget...
Just like the title says. I had to modify the code to work in one of my projects, but I think it would be helpful to others if this feature...
It is not immediately apparent from docs it only supports Numeric/String my custom validator for the interim: ``` def validate_date_presence(field, value, setting) if(value.is_a?(Time || Date)) return true else return false...
Is there a list of alternative adapters anywhere? `MotionModel::ArrayModelAdapter` is a nice starting point but a bit useless beyond initial experiments.
The [greater or less than](https://github.com/sxross/MotionModel/blob/master/motion/adapters/array_finder_query.rb#L95-137) comparisons are reversed. Example -- the `gt()` method as currently implemented: ``` ruby def gt ... ... do |comparator, item| comparator > item ``` which...
I just want to set starting point with conditional validations. I think it'd be cool to provide some feature to execute validations just in some defined contexts. In this PR...
Great stuff! Was just reading the README, and found some missing syntax highlighting. Thought I might as well fix them :wink: Cheers!
``` WARNING: description and summary are identical WARNING: open-ended dependency on bubble-wrap (>= 1.3.0) is not recommended if bubble-wrap is semantically versioned, use: add_runtime_dependency 'bubble-wrap', '~> 1.3', '>= 1.3.0' WARNING:...
There doesn't appear to be a hook or notification if using the `bulk_update {}` block. Perhaps there's a recommended way to do this that's not documented? Otherwise, I'm willing to...
*User can specify a parsing format to be used when type casting a date string into an NSDate object