登录 注册
其他
5,859
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Ruby
语言
—
创建时间
最近更新

项目能做什么

适用于 Rails 应用的快速多条件搜索与数据筛选库。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Ransack

> Search everywhere and in a hurry!

[![Build Status](https://github.com/activerecord-hackery/ransack/workflows/test/badge.svg)](https://github.com/activerecord-hackery/ransack/actions)
[![Gem Version](https://badge.fury.io/rb/ransack.svg)](http://badge.fury.io/rb/ransack)

Ransack adds **searching and sorting to your Rails application** with plain Ruby
and ERB, without a search server or any other infrastructure.

Ransack is supported for Rails 8.1 on Ruby 3.4 and later, on Postgres, MySQL, Trilogy and SQLite.

```ruby
gem 'ransack'
```

```ruby
@q = Post.ransack(params[:q])
@posts = @q.result
```

```erb
<%= search_form_for @q do |f| %>
  <%= f.search_field :title_cont %>
<% end %>
<%= sort_link(@q, :published_at) %>
```

## Documentation

**[activerecord-hackery.github.io/ransack](https://activerecord-hackery.github.io/ransack/)**:
[getting started](https://activerecord-hackery.github.io/ransack/getting-started/),
[authorization](https://activerecord-hackery.github.io/ransack/getting-started/authorization/),
[predicates](https://activerecord-hackery.github.io/ransack/getting-started/search-matches/),
[upgrading](https://activerecord-hackery.github.io/ransack/getting-started/upgrading/)
and more. The site is built from the Markdown under [`docs/`](docs/).

## Getting help and contributing

* Questions belong in [GitHub Discussions](https://github.com/activerecord-hackery/ransack/discussions).
* Reproducible bugs belong in [Issues](https://github.com/activerecord-hackery/ransack/issues).
  Read the [Contributing Guide](CONTRIBUTING.md) first; a failing test is the best bug report.
* Report security vulnerabilities privately, through GitHub
  [private vulnerability reporting](https://github.com/activerecord-hackery/ransack/security/advisories/new)
  or the [Tidelift security contact](https://tidelift.com/security). See the
  [Security Policy](.github/SECURITY.md) for supported versions.

Ransack is maintained by volunteers. If it is useful to you, please consider
supporting us via [Open Collective](https://opencollective.com/ransack), or
through the [Tidelift Subscription](https://tidelift.com/subscription/pkg/rubygems-ransack?utm_source=rubygems-ransack&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
for commercial support.

## Contributors

Ransack is maintained by [Sean Carroll](https://github.com/scarroll32),
[Deivid Rodriguez](https://github.com/deivid-rodriguez),
[Greg Molnar](https://github.com/gregmolnar) and
[a great group of contributors](https://github.com/activerecord-hackery/ransack/graphs/contributors).
It was created by [Ernie Miller](http://twitter.com/erniemiller). See
[Community and support](https://activerecord-hackery.github.io/ransack/project/community/)
for the full list.

<img src="https://opencollective.com/ransack/contributors.svg?width=890&button=false" />
阅读完整原文

项目深度分析 AI 生成

Ransack Pro UI:现代前端多条件查询组件库

产品构想针对 Ransack 仅提供基础 ERB 表单助手的现状,开发兼容 Rails 7/8 Hotwire(Turbo + Stimulus)与 TailwindCSS 的现代化多条件高级筛选 UI 组件包(类似 Notion/Linear 的动态过滤面板)。
核心功能动态增减 AND/OR 过滤规则组件、实时异步搜索(无需刷新)、保存常用视图过滤预设、Tailwind 样式开箱即用、无缝桥接 Ransack predicate 参数。
目标用户构建现代 SaaS 产品的 Rails 独立开发者与中小型研发团队。
难度/周期中等 · 3-6 周 · 成本:极低(主要是前端与 Rails 组件开发时间成本)
收费模式一次性买断授权(开发者许可/团队许可),通过 Gumroad 或 Lemon Squeezy 销售商业代码包。
竞争风险Rails 生态开发者习惯开源免费方案,付费转化率受限;需长期适配 Rails/Turbo 大版本升级。
依据 数据支持的判断

Ransack Guard & Optimize:企业级查询安全与性能监控中间件

产品构想解决 Ransack 在复杂数据表上易被构造恶意深层 JOIN、全表扫描导致数据库 CPU 飙升的问题,提供查询熔断、自动 EXPLAIN 拦截及慢查询告警的商业 Gem。
核心功能动态 JOIN 深度限制、易产生性能问题的 predicate 自动降级/拦截、慢查询耗时预估与熔断保护、多租户数据权限强制隔离检查。
目标用户中大型 Rails SaaS 公司技术负责人、DevOps/SRE 工程师。
难度/周期较高 · 2-3 个月 · 成本:低(需深入 SQL 优化与 ActiveRecord 内部机制)
收费模式按应用实例/按年订阅的商业专有 Gem 授权,或包含性能调优咨询的技术支持服务。
竞争风险需要深入理解不同数据库(PostgreSQL/MySQL)的执行计划,技术门槛高,客群决策周期较长。
依据 已验证事实

基于 Ransack 的低代码报表与数据导出引擎

产品构想将 Ransack 的查询能力封装为终端用户友好的自定义报表生成器,允许非技术人员自由组合筛选条件并异步导出千万级大数据集。
核心功能用户端可视化查询构建器、大文件异步流式导出(CSV/Excel)、导出审计日志、字段脱敏规则配置。
目标用户需要向企业客户提供高级数据自定义筛选与审计导出功能的 B2B 软件提供商。
难度/周期中等 · 1-2 个月 · 成本:低(基础测试服务器与开发环境)
收费模式功能模块授权费(B2B 嵌入式 SDK/Gem),按域名或应用收费。
竞争风险AI推测:部分团队倾向于完全自研导出逻辑,产品需显著降低其接入成本才能促成购买。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 51 个 Release
社区活跃Star 5,859 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。