Class: CustomTemplate

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/custom_template.rb

Overview

Class for custom templates (e.g. css and xslt). Mainly created for customization in the Discovery project. May need a major rework prior of being generally useful.

Instance Method Summary collapse

Instance Method Details

#create_permitted?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/custom_template.rb', line 15

def create_permitted?
  acting_user.administrator?
end

#destroy_permitted?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/custom_template.rb', line 19

def destroy_permitted?
  acting_user.administrator?
end

#update_permitted?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/custom_template.rb', line 23

def update_permitted?
  acting_user.administrator?
end

#view_permitted?(field) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/custom_template.rb', line 27

def view_permitted?(field)
  true
end