Class: Minerva::State

Inherits:
ApplicationRecord show all
Defined in:
app/models/minerva/state.rb

Instance Method Summary collapse

Instance Method Details

#readonly?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'app/models/minerva/state.rb', line 13

def readonly?
  # allow the creation, you can also use a more complex condition to allow updates under certain conditions
  new_record? ? false : true
end