This commit is contained in:
Renzo 2016-08-14 15:17:44 -05:00
parent b009bb77ad
commit 04dfa535c8
2 changed files with 9 additions and 21 deletions

View File

@ -20,7 +20,7 @@ class TagSubscriptionController extends ApplicationController
if (current_user()->tag_subscriptions->size() >= CONFIG()->max_tag_subscriptions) {
$this->tag_subscription = null;
} else {
$this->tag_subscription = TagSubscription::create(['user_id' => current_user()->id, 'tag_query' => '']);
$this->tag_subscription = TagSubscription::create(['user_id' => current_user()->id, 'tag_query' => '', 'name' => 'new tagsub']);
}
}
}

View File

@ -110,16 +110,4 @@ class TagSubscription extends Rails\ActiveRecord\Base
}
}
}
protected function validations()
{
return [
'name' => [
'length' => ['minimum' => 1]
],
'tag_query' => [
'length' => ['minimum' => 1]
],
];
}
}