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)


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

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