• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

rails/jquery-rails: A gem to automate using jQuery with Rails

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

rails/jquery-rails

开源软件地址:

https://github.com/rails/jquery-rails

开源编程语言:

Ruby 100.0%

开源软件介绍:

jquery-rails

jQuery! For Rails! So great.

This gem provides:

  • jQuery 1, 2 and 3
  • the jQuery UJS adapter
  • assert_select_jquery to test jQuery responses in Ruby tests

Versions

Starting with v2.1, the jquery-rails gem follows these version guidelines to provide more control over your app's jQuery version from your Gemfile:

patch version bump = updates to jquery-ujs, jquery-rails, and patch-level updates to jQuery
minor version bump = minor-level updates to jQuery
major version bump = major-level updates to jQuery and updates to Rails which may be backwards-incompatible

See VERSIONS.md to see which versions of jquery-rails bundle which versions of jQuery.

Installation

Add

gem 'jquery-rails'

to your Gemfile.

The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in app/assets/javascripts/application.js by default, add these lines:

//= require jquery
//= require jquery_ujs

If you are running Rails 5.1 and up, and if you have included //= require rails-ujs, then jquery_ujs is not needed anymore. You can just add:

//= require jquery

If you want to use jQuery 2, you can require jquery2 instead:

//= require jquery2
//= require jquery_ujs

And if you want to use jQuery 3, you can require jquery3:

//= require jquery3
//= require jquery_ujs

For jQuery UI, we recommend the jquery-ui-rails gem, as it includes the jquery-ui css and allows easier customization.

As of v3.0, jquery-rails no longer includes jQuery UI. Use the jquery-ui-rails gem above.

Contributing to jquery-rails

jquery-rails is work of many contributors. You're encouraged to submit pull requests, propose features and discuss issues.

  • If it's an issue pertaining to the jquery-ujs javascript, please report it to the jquery-ujs project.

  • If the jQuery scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jQuery scripts.

See CONTRIBUTING.

License

jquery-rails is released under the MIT License.

Acknowledgements

Many thanks are due to all of the jquery-rails contributors. Special thanks to JangoSteve for tirelessly answering questions and accepting patches, and the Rails Core Team for making jquery-rails an official part of Rails 3.1.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap