helpdesk 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7c264b1d4f7d74f09eaeb46e1654052b1572d2e
4
- data.tar.gz: 19894c8b1ab76fb70efb83b70c1f561c1ec00b28
3
+ metadata.gz: 70a9850e2834db223aeafc7470b0f47f1fceb886
4
+ data.tar.gz: 967935c0fca95a8f4466a66e95fb73b15c6c2a0d
5
5
  SHA512:
6
- metadata.gz: e96da624d0673c09ca321bf67cc82c431e406a2c66ced324ef60f512c4ee5909269d95368e1d7c0b4d822a870418e12357002244c7a1c9336ad8efbe0de21e41
7
- data.tar.gz: 58d8aca728fc2890ac71c618d725f46378503a227c19a9ddfc18975e8f5b12f055a47ad228693bc95aa063d94bf4392ead607fc7eafd99d5cba81b17fd21a18a
6
+ metadata.gz: 296fce427ebe697647dcc4deec33d181df97b4b81153571f74474bbcfde1e12edf2ab3c4993ec56d0b5c633ed519b137609f116d85026a7fadc4f97279416f42
7
+ data.tar.gz: 344ac0b84642ad24a68d0d3914ec339e76ac1adda274c8bc53a3a7b055a3de731147a415c79044a5ca8a7af1dd16ff66dcc01daf76583bdbe5b4561f20464387
@@ -70,7 +70,7 @@ class Helpdesk::Admin::TicketsController < Helpdesk::Admin::BaseController
70
70
  private
71
71
 
72
72
  def ticket_params
73
- params.require(:ticket).permit(:status, :assignee_id,:ticket_type_id, :subject, :description,comments_attributes:[:author_id, :comment, :public])
73
+ params.require(:ticket).permit(:status,:requester_id,:assignee_id,:ticket_type_id, :subject, :description,comments_attributes:[:author_id, :comment, :public])
74
74
  end
75
75
 
76
76
  end
@@ -4,7 +4,7 @@ module Helpdesk
4
4
  belongs_to :ticket
5
5
 
6
6
  default_scope -> {includes(:author).order('id ASC')}
7
- scope :pub, -> { where(:public, true)}
7
+ scope :pub, -> { where(public: true)}
8
8
 
9
9
  after_create :send_email
10
10
  after_create :check_reopen
@@ -5,7 +5,7 @@ module Helpdesk
5
5
 
6
6
  default_scope order('position ASC').includes(:translations)
7
7
 
8
- scope :active, where('active = ? ', true)
9
- scope :inactive, where('active = ? ', false)
8
+ scope :active, -> {where(active: true)}
9
+ scope :inactive, -> {where(active: false)}
10
10
  end
11
11
  end
@@ -31,7 +31,7 @@ module Helpdesk
31
31
  .includes(:ticket_type)
32
32
  .order('id DESC')}
33
33
 
34
- validates_presence_of :description,:requester_id,:ticket_type_id
34
+ validates_presence_of :description,:requester,:ticket_type_id
35
35
 
36
36
  accepts_nested_attributes_for :comments,:reject_if => lambda { |a| a[:comment].blank? }
37
37
 
@@ -5,8 +5,8 @@ module Helpdesk
5
5
 
6
6
  default_scope ->{order('position ASC')}
7
7
 
8
- scope :active, -> {where(:active, true)}
9
- scope :inactive, -> {where(:active, false)}
8
+ scope :active, -> {where(active: true)}
9
+ scope :inactive, -> {where(active: false)}
10
10
 
11
11
  end
12
12
  end
@@ -7,10 +7,10 @@
7
7
  - @ticket.errors.full_messages.each do |msg|
8
8
  %li
9
9
  = msg
10
- = f.input :requester_id, :collection => (Helpdesk.user_class).all,:label_method=>Helpdesk.display_user_uniq_info.to_sym, input_html: { class: 'chosen-select' }
10
+ = f.association :requester, :collection => (Helpdesk.user_class).all,:label_method=>Helpdesk.display_user_uniq_info.to_sym, input_html: { class: 'chosen-select' }
11
11
  = f.input :subject
12
12
  = f.input :status, :collection => tickets_statuses_for_select, include_blank: false
13
- = f.input :assignee_id, :collection => helpdesk_admin_collection
13
+ = f.input :assignee, :collection => helpdesk_admin_collection
14
14
  = f.input :ticket_type_id, :collection => Helpdesk::TicketType.active,include_blank: false
15
15
  - if @ticket.new_record?
16
16
  = f.input :description,input_html:{rows:4}
@@ -20,4 +20,4 @@
20
20
 
21
21
  %div.form-actions
22
22
  = f.button :submit, :class => 'btn btn-primary'
23
- = submit_tag 'Anuluj', :type => :reset, :class => "btn btn-danger"
23
+ = submit_tag t('helpdesk..tickets.cancel'), :type => :reset, :class => "btn btn-danger"
@@ -33,4 +33,4 @@
33
33
  = tickets_form.input :author_id, :as => :hidden, :input_html => { :value => helpdesk_user.id }
34
34
  %div.form-actions
35
35
  = f.button :submit, :class => 'btn btn-primary'
36
- = submit_tag 'Anuluj', :type => :reset, :class => "btn btn-danger"
36
+ = submit_tag t('helpdesk..tickets.cancel'), :type => :reset, :class => "btn btn-danger"
@@ -35,4 +35,4 @@
35
35
  = tickets_form.input :author_id, :as => :hidden, :input_html => { :value => helpdesk_user.id }
36
36
  %div
37
37
  = f.button :submit, :class => 'btn btn-primary'
38
- = submit_tag 'Anuluj', :type => :reset, :class => "btn btn-default"
38
+ = submit_tag t('helpdesk..tickets.cancel'), :type => :reset, :class => "btn btn-default"
@@ -47,7 +47,7 @@ en:
47
47
 
48
48
  subscribers:
49
49
  title: Subscribers
50
- confirmed: Confirmed subskrybenci
50
+ confirmed: Confirmed Subscribers
51
51
  unconfirmed: Unconfirmed
52
52
  all: All Subscribers
53
53
  new: Add Subscriber
@@ -1,3 +1,3 @@
1
1
  module Helpdesk
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpdesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Beynon Wacław Łuczak