Reduce the amount of JavaScript written in views
Seeing `:javascript` all over Views feels like a code smell. This goes a long way towards reducing the amount of JS in views, but there's still plenty to be done on that front.
This commit is contained in:
parent
b565f33472
commit
d6c384c20f
18 changed files with 22 additions and 122 deletions
|
@ -32,7 +32,7 @@
|
|||
- unless project.new_record?
|
||||
.clearfix
|
||||
= f.label :owner_id
|
||||
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
|
||||
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
|
||||
|
||||
- if project.repo_exists?
|
||||
.clearfix
|
||||
|
@ -69,7 +69,6 @@
|
|||
|
||||
:javascript
|
||||
$(function(){
|
||||
$('#project_owner_id').chosen();
|
||||
new Projects();
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue