```ruby
class SideType < ActiveRecord::Base

  default_scope { order(:code) }

  scope :active, -> { where(active: true) }

  def to_s
    name
  end

end
```

Use correct coding for default name
user
```ruby
class SideType < ActiveRecord::Base

  default_scope { order(:code) }

  scope :active, -> { where(active: true) }

  def to_s
    code
  end

end
```
assistant