def index
      params[:locale_eq] ||= I18n.default_locale
      scope = Phrase.where(locale: params[:locale_eq])

      if params[:q].present?
        scope = scope.where("i18n_key ilike ? OR i18n_value ilike ?", "%#{params[:q]}%", "%#{params[:q]}%")
      end

      respond_to do |format|
        format.html {
          @phrases = scope.paginate(:page => params[:page])
        }
        format.csv {
          render text: PhraseExporter.to_csv(scope)
        }
        format.yaml {
          render text: PhraseExporter.to_yaml(scope)
        }
        format.json {
          @phrases = scope.paginate(:page => params[:page])
          render json: {
            meta: {
              pagination: {
                current_page: @phrases.current_page,
                per_page: @phrases.per_page,
                total_entries: @phrases.total_entries
              }
            },
            phrases: @phrases
          }
        }
      end
    end
def index
      params[:locale_eq] ||= I18n.default_locale
      scope = Phrase.where(locale: params[:locale_eq])

      if params[:q].present?
        scope = scope.where("i18n_key ilike ? OR i18n_value ilike ?", "%#{params[:q]}%", "%#{params[:q]}%")
      end

      respond_to do |format|
        format.html {
          @phrases = scope.paginate(:page => params[:page])
        }
        format.csv {
          render text: PhraseExporter.to_csv(scope)
        }
        format.yaml {
          render text: PhraseExporter.to_yaml(scope)
        }
        format.json {
          @phrases = scope.paginate(:page => params[:page])
          render json: {
            meta: {
              pagination: {
                current_page: @phrases.current_page,
                per_page: @phrases.per_page,
                total_entries: @phrases.total_entries
              }
            },
            phrases: @phrases
          }
        }
      end
    end
GET /phrases