Fixed fix #192
This commit is contained in:
parent
b009bb77ad
commit
04dfa535c8
@ -20,7 +20,7 @@ class TagSubscriptionController extends ApplicationController
|
|||||||
if (current_user()->tag_subscriptions->size() >= CONFIG()->max_tag_subscriptions) {
|
if (current_user()->tag_subscriptions->size() >= CONFIG()->max_tag_subscriptions) {
|
||||||
$this->tag_subscription = null;
|
$this->tag_subscription = null;
|
||||||
} else {
|
} 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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,16 +110,4 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validations()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'name' => [
|
|
||||||
'length' => ['minimum' => 1]
|
|
||||||
],
|
|
||||||
'tag_query' => [
|
|
||||||
'length' => ['minimum' => 1]
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user