gaku 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -4
  3. data/VERSION +1 -1
  4. data/core/app/controllers/concerns/enrollments_controller.rb +1 -2
  5. data/core/app/controllers/gaku/contacts_controller.rb +3 -3
  6. data/core/app/controllers/gaku/notes_controller.rb +33 -24
  7. data/core/app/controllers/gaku/syllabuses_controller.rb +44 -16
  8. data/core/app/models/gaku/address.rb +1 -1
  9. data/core/app/models/gaku/class_group_enrollment.rb +4 -3
  10. data/core/app/models/gaku/contact.rb +2 -2
  11. data/core/app/models/gaku/grading_method_set.rb +1 -1
  12. data/core/app/views/gaku/class_groups/students/enroll_students.js.erb +6 -0
  13. data/core/app/views/gaku/contacts/_form_fields.html.slim +1 -1
  14. data/core/app/views/gaku/notes/create.js.erb +3 -3
  15. data/core/app/views/gaku/notes/destroy.js.erb +3 -3
  16. data/core/app/views/gaku/notes/edit.js.erb +1 -1
  17. data/core/app/views/gaku/notes/new.js.erb +1 -1
  18. data/core/app/views/gaku/notes/show.js.erb +1 -1
  19. data/core/app/views/gaku/notes/update.js.erb +2 -2
  20. data/core/app/views/gaku/syllabuses/_syllabus_fields.html.slim +2 -3
  21. data/core/app/views/gaku/syllabuses/_syllabuses.html.slim +1 -1
  22. data/core/app/views/gaku/syllabuses/create.js.erb +4 -3
  23. data/core/app/views/gaku/syllabuses/destroy.js.erb +1 -1
  24. data/core/app/views/gaku/syllabuses/{show.html.slim → edit.html.slim} +0 -0
  25. data/core/app/views/gaku/syllabuses/edit.js.erb +1 -1
  26. data/core/app/views/gaku/syllabuses/new.js.erb +1 -1
  27. data/core/app/views/gaku/syllabuses/update.js.erb +1 -1
  28. data/core/config/routes.rb +0 -8
  29. data/core/gaku_core.gemspec +15 -11
  30. data/core/lib/gaku/testing/factories/note_factory.rb +4 -0
  31. data/core/lib/gaku/testing/factories/syllabus_factory.rb +4 -0
  32. data/core/lib/gaku/testing/request_helpers.rb +5 -0
  33. data/core/spec/controllers/gaku/addresses_controller_spec.rb +1 -1
  34. data/core/spec/controllers/gaku/contacts_controller_spec.rb +83 -12
  35. data/core/spec/controllers/gaku/notes_controller_spec.rb +143 -0
  36. data/core/spec/controllers/gaku/syllabuses_controller_spec.rb +140 -0
  37. data/core/spec/requests/admin/achievements/achievements_spec.rb +1 -1
  38. data/core/spec/requests/admin/grading/grading_method_set_items_spec.rb +1 -1
  39. data/core/spec/requests/admin/grading/grading_method_sets_spec.rb +1 -1
  40. data/core/spec/requests/admin/grading/grading_methods_spec.rb +1 -1
  41. data/core/spec/requests/admin/roles_spec.rb +1 -1
  42. data/core/spec/requests/admin/school_years/school_years_spec.rb +1 -1
  43. data/core/spec/requests/admin/school_years/semesters_spec.rb +1 -1
  44. data/core/spec/requests/admin/schools/campuses/addresses_spec.rb +1 -1
  45. data/core/spec/requests/admin/schools/campuses/campuses_spec.rb +1 -1
  46. data/core/spec/requests/admin/schools/campuses/contacts_spec.rb +10 -22
  47. data/core/spec/requests/admin/schools/programs_spec.rb +1 -1
  48. data/core/spec/requests/admin/schools/school_levels_spec.rb +1 -1
  49. data/core/spec/requests/admin/schools/schools_spec.rb +1 -1
  50. data/core/spec/requests/admin/specialties_spec.rb +1 -1
  51. data/core/spec/requests/admin/templates_spec.rb +1 -1
  52. data/core/spec/requests/admin/types_and_methods/attendance_types_spec.rb +1 -1
  53. data/core/spec/requests/admin/types_and_methods/commute_method_types_spec.rb +1 -1
  54. data/core/spec/requests/admin/types_and_methods/contact_types_spec.rb +1 -1
  55. data/core/spec/requests/admin/types_and_methods/enrollment_statuses_spec.rb +1 -1
  56. data/core/spec/requests/admin/types_and_methods/states_spec.rb +1 -1
  57. data/core/spec/requests/admin/users_spec.rb +1 -1
  58. data/core/spec/requests/class_groups/class_groups_spec.rb +1 -1
  59. data/core/spec/requests/class_groups/notes_spec.rb +6 -13
  60. data/core/spec/requests/class_groups/semester_class_groups_spec.rb +1 -1
  61. data/core/spec/requests/course_groups/course_groups_spec.rb +1 -1
  62. data/core/spec/requests/courses/courses_spec.rb +1 -1
  63. data/core/spec/requests/courses/notes_spec.rb +6 -11
  64. data/core/spec/requests/courses/semester_courses_spec.rb +1 -1
  65. data/core/spec/requests/exams/exam_portions/attachments_spec.rb +1 -1
  66. data/core/spec/requests/exams/notes_spec.rb +6 -11
  67. data/core/spec/requests/students/achievements_spec.rb +1 -1
  68. data/core/spec/requests/students/contacts_spec.rb +7 -7
  69. data/core/spec/requests/students/guardians/contacts_spec.rb +9 -17
  70. data/core/spec/requests/students/notes_spec.rb +5 -9
  71. data/core/spec/requests/students/simple_grades_spec.rb +1 -1
  72. data/core/spec/requests/students/specialties_spec.rb +1 -1
  73. data/core/spec/requests/syllabuses/exams_spec.rb +5 -5
  74. data/core/spec/requests/syllabuses/notes_spec.rb +5 -10
  75. data/core/spec/requests/syllabuses/syllabuses_spec.rb +46 -85
  76. data/core/spec/requests/teachers/contacts_spec.rb +11 -19
  77. data/core/spec/requests/teachers/notes_spec.rb +5 -10
  78. data/core/spec/support/requests/shared_addresses_spec.rb +6 -2
  79. data/core/spec/support/requests/shared_contacts_spec.rb +19 -15
  80. data/core/spec/support/requests/shared_notes_spec.rb +36 -35
  81. data/gaku_dependencies.rb +1 -8
  82. metadata +9 -9
  83. data/core/app/controllers/gaku/assignments_controller.rb +0 -15
  84. data/core/spec/controllers/gaku/syllabuses/syllabuses_controller_spec.rb +0 -92
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c62b7a0bad0b0421791bf0522b4d26994c96f086
4
- data.tar.gz: 2c3d59ec5c13c1d6f16750dcd14f994fc271b58c
3
+ metadata.gz: 5474503b8dd52288efd403fe8747063aeac22208
4
+ data.tar.gz: 5ee33d43e57e47d42fcbb4924639f579470c7962
5
5
  SHA512:
6
- metadata.gz: eacd8170e31b8e687a47fce41df04bb88d3c8ca7476953a1f672526fd8fd5248c0f04e0b348146b009a9b716625054f5a289d179530fcab669e53041a29b842b
7
- data.tar.gz: efcc6854ed4c3fbb040ecb05265ff957243e4b3efa1cc8e860ef4d538e126536e09a58a22d5d15780ed560ca3c4c9e409bf0a4dbde96da71e2f5e5f3cba79620
6
+ metadata.gz: 3fcc49533fa2d448820ed37720eb52fe340004e478945104279071e44ae3c2fad2924258f92cd0707c96d180fd220704f6c62d8bceef4708e3f0ebdecedfe14c
7
+ data.tar.gz: 42de59feb61a93ca0e63ee97278ccd3694b8d3263798fd24085df3cf3b87fb54a70b698d34d034cb0784f8f908ca8e28070ae9d79dba457974bf1126fa09ea07
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
+ [![Gem Version](https://badge.fury.io/rb/gaku.png)](http://badge.fury.io/rb/gaku)
1
2
  [![Build Status](https://travis-ci.org/Genshin/gaku.png)](https://travis-ci.org/Genshin/gaku)
2
- [![Code Climate](https://codeclimate.com/github/Genshin/gaku.png)](https://codeclimate.com/github/Genshin/gaku)
3
3
  [![Coverage Status](https://coveralls.io/repos/Genshin/gaku/badge.png?branch=master)](https://coveralls.io/r/Genshin/gaku?branch=master)
4
+ [![Code Climate](https://codeclimate.com/github/Genshin/gaku.png)](https://codeclimate.com/github/Genshin/gaku)
4
5
 
5
6
  GAKU Engine [学園陣]
6
7
  ====================
@@ -63,12 +64,19 @@ Create a new Rails application:
63
64
  $ rails _4.0.0_ new my_app
64
65
 
65
66
 
66
- Then add GAKU to your Gemfile.
67
+ Then add GAKU to your Gemfile:
68
+ ```ruby
69
+ gem 'globalize3', github: 'globalize/globalize', branch: 'rails4', ref: '82b3b36308677745b261bd147dda00ed4560a25d'
70
+ gem 'gaku', '~> 0.0.2'
71
+ ```
67
72
 
73
+ Or use the master branch:
68
74
  ```ruby
75
+ gem 'globalize3', github: 'globalize/globalize', branch: 'rails4', ref: '82b3b36308677745b261bd147dda00ed4560a25d'
69
76
  gem 'gaku', github: 'Genshin/gaku'
70
77
  ```
71
78
 
79
+
72
80
  Install dependencies:
73
81
 
74
82
  $ bundle
@@ -85,10 +93,10 @@ Sample Data
85
93
  -----------
86
94
  If you want to populate sample data:
87
95
 
88
- $ rake gaku:sample:load
96
+ $ rake db:sample
89
97
 
90
98
  Defaults:
91
- user: admin pass: 123456
99
+ user: admin / pass: 123456
92
100
 
93
101
 
94
102
  Run
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -3,8 +3,7 @@ module EnrollmentsController
3
3
  include Gaku::ClassNameDetector
4
4
 
5
5
  def enroll_students
6
- params[:selected_students].nil? ? @selected_students = [] : @selected_students = params[:selected_students]
7
-
6
+ @selected_students = params[:selected_students].presence || []
8
7
  enroll_selected_students
9
8
 
10
9
  if params[:source] == class_name_underscored_plural
@@ -5,9 +5,9 @@ module Gaku
5
5
 
6
6
  include PolymorphicResourceConcern
7
7
 
8
- respond_to :js, :html
8
+ respond_to :js
9
9
 
10
- before_action :set_contact_types
10
+ before_action :set_contact_types, only: %i( new edit )
11
11
  before_action :set_unscoped_contact, only: %i( recovery destroy )
12
12
  before_action :set_contact, only: %i( edit update soft_delete make_primary )
13
13
  before_action :set_polymorphic_resource
@@ -92,7 +92,7 @@ module Gaku
92
92
  end
93
93
 
94
94
  def set_contact_types
95
- @contact_types = ContactType.all.map { |ct| [ct.name, ct.id] }
95
+ @contact_types = ContactType.all
96
96
  end
97
97
 
98
98
  def set_count
@@ -1,50 +1,51 @@
1
1
  module Gaku
2
2
  class NotesController < GakuController
3
3
 
4
- load_and_authorize_resource :note, class: Gaku::Note
4
+ #load_and_authorize_resource :note, class: Gaku::Note
5
5
 
6
- before_filter :notable
7
- inherit_resources
8
- respond_to :js, :html
6
+ before_action :set_notable
7
+ before_action :set_note, only: %i( edit update destroy )
8
+ respond_to :js
9
9
 
10
10
  def new
11
- @note = @notable.notes.new
12
- new!
11
+ @note = Note.new
12
+ respond_with @note
13
13
  end
14
14
 
15
15
  def create
16
16
  @note = @notable.notes.new(note_params)
17
- create!
17
+ @note.save
18
+ set_count
19
+ respond_with @note
18
20
  end
19
21
 
20
- protected
22
+ def edit
23
+ end
21
24
 
22
- # def begin_of_association_chain
23
- # notable
24
- # @notable.notes
25
- # end
25
+ def show
26
+ end
26
27
 
27
- def note_params
28
- params.require(:note).permit(note_attr)
28
+ def update
29
+ @note.update(note_params)
30
+ respond_with @note
29
31
  end
30
32
 
31
- def resource_params
32
- return [] if request.get?
33
- [params.require(:note).permit(note_attr)]
33
+ def destroy
34
+ @note.destroy
35
+ set_count
36
+ respond_with @note
34
37
  end
35
38
 
36
39
  private
37
40
 
38
- def note_attr
39
- %i(title content)
41
+ def note_params
42
+ params.require(:note).permit(note_attr)
40
43
  end
41
44
 
42
- def collection
43
- @notes = @notable.notes
45
+ def note_attr
46
+ %i(title content)
44
47
  end
45
48
 
46
- private
47
-
48
49
  def notable_klasses
49
50
  [
50
51
  Gaku::Student,
@@ -57,7 +58,15 @@ module Gaku
57
58
  ]
58
59
  end
59
60
 
60
- def notable
61
+ def set_count
62
+ @count = @notable.reload.notes_count
63
+ end
64
+
65
+ def set_note
66
+ @note = Note.find(params[:id])
67
+ end
68
+
69
+ def set_notable
61
70
  unnamespaced_klass = ''
62
71
  klass = notable_klasses.find do |c|
63
72
  unnamespaced_klass = c.to_s.split('::')
@@ -1,43 +1,71 @@
1
1
  module Gaku
2
2
  class SyllabusesController < GakuController
3
3
 
4
- load_and_authorize_resource class: Gaku::Syllabus
4
+ #load_and_authorize_resource class: Gaku::Syllabus
5
5
 
6
- before_filter :before_show, only: :show
7
- before_filter :count, only: [:create, :destroy, :index]
6
+ respond_to :js, only: %i( new create edit update destroy )
7
+ respond_to :html, only: %i( index edit show )
8
8
 
9
- inherit_resources
10
- respond_to :js, :html
9
+ before_action :set_syllabus, only: %i( edit update destroy )
11
10
 
12
- protected
11
+ def new
12
+ @syllabus = Syllabus.new
13
+ respond_with @syllabus
14
+ end
15
+
16
+ def create
17
+ @syllabus = Syllabus.new(syllabus_params)
18
+ @syllabus.save
19
+ set_count
20
+ respond_with @syllabus
21
+ end
13
22
 
14
- def resource_params
15
- return [] if request.get?
16
- [params.require(:syllabus).permit(syllabus_attr)]
23
+ def index
24
+ @syllabuses = Syllabus.all
25
+ set_count
26
+ respond_with @syllabuses
27
+ end
28
+
29
+ def edit
30
+ set_grading_methods
31
+ set_notable
32
+ end
33
+
34
+ def update
35
+ @syllabus.update(syllabus_params)
36
+ respond_with @syllabus
37
+ end
38
+
39
+ def destroy
40
+ @syllabus.destroy
41
+ set_count
42
+ respond_with @syllabus
17
43
  end
18
44
 
19
45
  private
20
46
 
47
+ def syllabus_params
48
+ params.require(:syllabus).permit(syllabus_attr)
49
+ end
50
+
21
51
  def syllabus_attr
22
- %i(name code credits description)
52
+ %i( name code credits description )
23
53
  end
24
54
 
25
- def syllabus
55
+ def set_syllabus
26
56
  @syllabus = Syllabus.find(params[:id])
27
57
  end
28
58
 
29
- def grading_methods
59
+ def set_grading_methods
30
60
  @grading_methods = GradingMethod.all
31
61
  end
32
62
 
33
- def before_show
34
- syllabus
63
+ def set_notable
35
64
  @notable = @syllabus
36
65
  @notable_resource = get_resource_name @notable
37
- grading_methods
38
66
  end
39
67
 
40
- def count
68
+ def set_count
41
69
  @count = Syllabus.count
42
70
  end
43
71
 
@@ -27,7 +27,7 @@ module Gaku
27
27
  after_destroy :reset_counter_cache
28
28
 
29
29
  def make_primary
30
- addresses.where('id != ?', id).update_all(primary: false)
30
+ addresses.where.not(id: id).update_all(primary: false)
31
31
  update_attribute(:primary, true)
32
32
  update_primary_address_field
33
33
  end
@@ -16,15 +16,16 @@ module Gaku
16
16
 
17
17
  after_save :save_student_class_and_number
18
18
 
19
+ def class_and_number
20
+ "#{class_group} - ##{seat_number}"
21
+ end
22
+
19
23
  private
20
24
 
21
25
  def save_student_class_and_number
22
26
  student.update_attribute(:class_and_number, class_and_number) if student
23
27
  end
24
28
 
25
- def class_and_number
26
- "#{class_group} - ##{seat_number}"
27
- end
28
29
 
29
30
  end
30
31
  end
@@ -48,7 +48,7 @@ module Gaku
48
48
  end
49
49
 
50
50
  def make_primary
51
- contacts.where(['id != ?', id]).update_all(primary: false)
51
+ contacts.where.not(id: id).update_all(primary: false)
52
52
  update_attribute(:primary, true)
53
53
 
54
54
  if contactable.has_attribute?(:primary_contact)
@@ -79,7 +79,7 @@ module Gaku
79
79
  end
80
80
 
81
81
  def remove_other_primary
82
- contacts.where('id != ?', id).update_all(primary: false) if primary?
82
+ contacts.where.not(id: id).update_all(primary: false) if primary?
83
83
  end
84
84
 
85
85
  def ensure_first_is_primary
@@ -9,7 +9,7 @@ module Gaku
9
9
  before_save :ensure_first_is_primary, on: :create
10
10
 
11
11
  def make_primary
12
- GradingMethodSet.where(['id != ?', id]).update_all({ primary: false })
12
+ GradingMethodSet.where.not(id: id).update_all({ primary: false })
13
13
  update_attribute(:primary, true)
14
14
  end
15
15
 
@@ -9,3 +9,9 @@ $('.class-group-enrollments-count').html('<%= print_count(@count, t_student_list
9
9
 
10
10
  $('#student-modal').modal('hide');
11
11
  showNotice("<%= render_flash %>");
12
+
13
+ var enrollments = <%= raw @enrollments.map {|e| [e.student_id, e.class_and_number ]}.to_json %>
14
+ enrollments.forEach(function(enrollment) {
15
+ $('#student-' + enrollment[0] + ' td:eq(5)' ).html(enrollment[1])
16
+ })
17
+
@@ -1,6 +1,6 @@
1
1
  .row-fluid
2
2
  .span6
3
- = f.select :contact_type_id, @contact_types, {prompt: t(:'contact_type.choose')}, label: t(:'contact_type.plural')
3
+ = f.select :contact_type_id, options_from_collection_for_select(@contact_types, :id, :name), {prompt: t(:'contact_type.choose')}, label: t(:'contact_type.plural')
4
4
  .span6
5
5
  = f.text_field :data, label: t(:'contact.data')
6
6
 
@@ -1,4 +1,4 @@
1
- $('#<%= @notable_resource %>-notes-index tbody').append('<%= render_js_partial("note", {note: @notable.notes.last}) %>');
1
+ $('#<%= @notable_resource %>-notes-index tbody').append('<%= j render("note", {note: @note}) %>');
2
2
  $('#new-<%= @notable_resource %>-note form').each(function() {
3
3
  this.reset();
4
4
  });
@@ -6,6 +6,6 @@ $('#new-<%= @notable_resource %>-note form').each(function() {
6
6
  $('#new-<%= @notable_resource %>-note').slide();
7
7
  $('#new-<%= @notable_resource %>-note-link').show();
8
8
 
9
- $('#<%= @notable_resource %>-notes-tab-link').html("<%= print_count(@notable.notes_count + 1, t('note.plural')) %>");
10
- $('.<%= @notable_resource %>-notes-count').html("<%= print_count(@notable.notes_count + 1, t('note.list')) %>");
9
+ $('#<%= @notable_resource %>-notes-tab-link').html("<%= print_count(@count, t('note.plural')) %>");
10
+ $('.<%= @notable_resource %>-notes-count').html("<%= print_count(@count, t('note.list')) %>");
11
11
  showNotice("<%= render_flash %>");
@@ -1,4 +1,4 @@
1
- $('#new-<%= @notable_resource %>-note-tab-link').html("<%= print_count(@notable.notes_count-1, t('note.plural')) %>");
2
- $('.<%= @notable_resource %>-notes-count').html("<%= print_count(@notable.notes_count-1, t('note.list')) %>");
3
- $('#<%= @notable_resource %>-notes-tab-link').html("<%= print_count(@notable.notes_count-1, t('note.plural')) %>");
1
+ $('#new-<%= @notable_resource %>-note-tab-link').html("<%= print_count(@count, t('note.plural')) %>");
2
+ $('.<%= @notable_resource %>-notes-count').html("<%= print_count(@count, t('note.list')) %>");
3
+ $('#<%= @notable_resource %>-notes-tab-link').html("<%= print_count(@count, t('note.plural')) %>");
4
4
  showNotice("<%= render_flash %>");
@@ -1,3 +1,3 @@
1
- $('#modal-dialogs').html('<%= render_js_partial("modal", {note: @note}) %>');
1
+ $('#modal-dialogs').html('<%= j render("modal", {note: @note}) %>');
2
2
  $('#edit-note-modal').modal('show');
3
3
  $('.remote-form').enableValidations();
@@ -1,3 +1,3 @@
1
- $('#new-<%= @notable_resource%>-note').html('<%= render_js_partial("form") %>').slide();
1
+ $('#new-<%= @notable_resource%>-note').html('<%= j render("form") %>').slide();
2
2
  $('#new-<%= @notable_resource%>-note-link').hide();
3
3
  $('.remote-form').enableValidations();
@@ -1,3 +1,3 @@
1
- $('#modal-dialogs').html("<%= render_js_partial('show_modal', {note: @note}) %>");
1
+ $('#modal-dialogs').html("<%= j render('show_modal', {note: @note}) %>");
2
2
  $('#note').modal('show');
3
3
 
@@ -1,4 +1,4 @@
1
- $('tr#note-<%= @note.id %>').html('<%= render_js_partial("gaku/notes/fields", {note: @note}) %>');
2
- $('tr#note-<%= @note.id %>').append('<%= render_js_partial("buttons", {note: @note}) %>');
1
+ $('tr#note-<%= @note.id %>').html('<%= j render("gaku/notes/fields", {note: @note}) %>');
2
+ $('tr#note-<%= @note.id %>').append('<%= j render("buttons", {note: @note}) %>');
3
3
  $("#edit-note-modal").modal('hide');
4
4
  showNotice("<%= render_flash %>");
@@ -1,5 +1,4 @@
1
1
  = render 'gaku/shared/fields/syllabus_fields', syllabus: syllabus
2
2
  td
3
- = link_to_show syllabus
4
- = ajax_link_to_edit [:edit, syllabus]
5
- = ajax_link_to_delete syllabus
3
+ = link_to_edit [:edit, syllabus]
4
+ = ajax_link_to_edit [:edit, syllabus]
@@ -6,6 +6,6 @@
6
6
  = th t(:'syllabus.description')
7
7
  = th t(:'syllabus.credits')
8
8
  = th t(:'exam.plural')
9
- = th_actions 3
9
+ = th_actions 2
10
10
  tbody
11
11
  = render partial: 'syllabus', collection: @syllabuses, as: 'syllabus'
@@ -1,6 +1,7 @@
1
- $('table#syllabuses-index tbody').append('<%= render_js_partial("syllabus", {syllabus: @syllabus}) %>');
1
+ showNotice("<%= render_flash %>");
2
+
3
+ $('table#syllabuses-index tbody').append('<%= j render("syllabus", {syllabus: @syllabus}) %>');
2
4
  $('#new-syllabus form')[0].reset();
3
5
  $('#new-syllabus').slide();
4
6
  $('#new-syllabus-link').show();
5
- $('.syllabuses-count').html('<%= print_count(@count+1, t_syllabus_list) %>');
6
- showNotice("<%= render_flash %>");
7
+ $('.syllabuses-count').html('<%= print_count(@count, t_syllabus_list) %>');
@@ -1,2 +1,2 @@
1
1
  showNotice("<%= render_flash %>");
2
- $('.syllabuses-count').html('<%= print_count(@count-1, t_syllabus_list) %>');
2
+ $('.syllabuses-count').html('<%= print_count(@count, t_syllabus_list) %>');
@@ -1,3 +1,3 @@
1
- $('#modal-dialogs').html('<%= render_js_partial("modal", {syllabus: @syllabus}) %>');
1
+ $('#modal-dialogs').html('<%= j render("modal", {syllabus: @syllabus}) %>');
2
2
  $('#syllabus-modal').modal('show');
3
3
  $('.remote-form').enableValidations();