Skip to content

Commit

Permalink
Removing arbitrary restriction on column names
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrockwell committed Aug 18, 2015
1 parent d24563e commit 7426072
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
5 changes: 1 addition & 4 deletions es6/lib/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,7 @@ export default class Model {
}

[symbols.properties]() {
const cleanedProperties = Object.keys(this).filter((key) => {
return key !== "database";
});
return cleanedProperties;
return Object.keys(this);
}

[symbols.validations]() {
Expand Down
1 change: 0 additions & 1 deletion es6/lib/model/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import flowsync from "flowsync";
import MultiError from "blunder";
import Datetime from "fleming";
import symbols from "./symbols";
import util from "util";

//private methods
function propagate(callback) {
Expand Down
18 changes: 5 additions & 13 deletions es6/spec/model.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ import databaseConfig from "./databaseConfig.json";
let userFixtures = require("./fixtures/users.json");

describe("Model(attributes, options)", () => {
/**
* Instantiate Model Examples
*/

let model,
user,
userAttributes,
photo,
comment,
clock;
user,
userAttributes,
photo,
comment,
clock;

beforeEach(() => {
clock = sinon.useFakeTimers();
Expand Down Expand Up @@ -97,10 +93,6 @@ describe("Model(attributes, options)", () => {
it("should return the name of all attributes plus associations on the model", () => {
user.properties.should.eql(properties);
});
it("should not return 'database'", () => {
user.database = {};
user.properties.should.eql(properties);
});
});

describe(".tableName", () => {
Expand Down

0 comments on commit 7426072

Please sign in to comment.