app/models/concerns/versioning.rb
# The following method returns all objects which should be selectable by the editor
The following method returns all objects which should be selectable by the editor
The following method returns all objects which should be selectable by the editor
def editor_selectable
      where(
        arel_table[:published_at].not_eq(nil).or( 
          arel_table[:published_at].eq(nil).and(arel_table[:published_version_id].eq(nil)) 
        )
      )
    end
def editor_selectable where ( arel_table [ :published_at ] . not_eq ( nil ) . or ( arel_table [ :published_at ] . eq ( nil ) . and ( arel_table [ :published_version_id ] . eq ( nil ) ) ) ) end
The following method returns all objects which should be selectable by the editor
The following method returns all objects which should be selectable by the editor
# == published (is there a way to OR combine two scopes? `published OR where(...)`) # this are all unpublished with no published version