Class: ScottyDogSaying

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/scotty_dog_saying.rb

Instance Method Summary collapse

Instance Method Details

#editable?(current_user) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
14
# File 'app/models/scotty_dog_saying.rb', line 6

def editable?(current_user)
  if (current_user && current_user.is_admin?)
    return true
  end
  if (current_user && current_user.id == user_id)
    return true
  end
  return false
end