MotionModel
MotionModel copied to clipboard
Simple Model and Validation Mixins for RubyMotion
A `date` column type will initialize a timestamp of `2014-10-28T22:30:00.000-07:00` to `nil`. Rather than limit the type casting to specific formats, the model should allow the specification of a format...
Seems like x should be unchanged in the following example. What do you think? ``` ruby x = Model.all #=> [] Model.create x #=>[] ``` Using the ArrayModelAdapter
Sql
Here are a few fixes and improvements I`ve been doing in the last days to be able to use it in our production app. I will probably keep improving this...
The 'where' method in has_many relation is modifying the receiver in a special case ``` ruby assignees = task.assignees assignees.where(:assignee_name => "Assignee 1") # this changes the assignees count to...
when using ArrayModelAdapter, calling record.save! would raise an exception for existing records. the underlying reason is that the ArrayModelAdapter doesn't do anything with save, so it had no return value....
While looping through server response and populating the model, at times motion model raises either of the following exception ``` ruby model.rb:802:in `method_missing:': undefined method `created_at=' ``` or ``` ruby...
For example: ``` ruby class FakeModel include MotionModel::Model include MotionModel::ArrayModelAdapter include MotionModel::Validatable columns test: { type: :array, default: [] } end @one = FakeModel.new @two = FakeModel.new @one.test.push(:one) p @one.test.object_id...
Hello, I try to configure sqlite with MotionModel : This require : require 'motion_model/fmdb' give me this error : ``` $rake Build ./build/iPhoneSimulator-7.0-Development Received exception: No headers to parse: /usr/bin/gen_bridge_metadata:979:in...
After second deserialization for example it doubles counts like for example there were 10 items `Item.all.count #=> 10` and after deserialization it's 20. And every item is with the same...
Given the following models/relationship - ``` ruby class Address include MotionModel::Model include MotionModel::ArrayModelAdapter columns street: :string, city: :string belongs_to :user end class User include MotionModel::Model include MotionModel::ArrayModelAdapter columns name: :string...