
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
A hassle-free autocomplete for Rails 3.2 using Twitter bootstrap.
Add this line to your application's Gemfile:
gem 'rails_autocomplete'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rails_autocomplete
Then you need to add the following line to your application.js:
//= require rails_autocomplete
Assuming you have a Post model where you want to autocomplete posts based on their title field:
Add the following to app/views/posts/_form.html.erb:
<%= f.autocomplete_field :post, autocomplete_posts_path %>
app/controllers/posts_controller.rb:
def autocomplete
@posts = Post.autocomplete(:name, params[:q])
respond_to do |format|
format.json { render json: @posts }
end
end
When a text field is autocompleted, it triggers an autocomplete
event, it also passes the data that has been autocompleted, both id
and value
$("#input").on("autocomplete", function(event, data){
console.log("Autocompleted id is " + data.id);
console.log("Autocompleted value is "+ data.value);
});
Please see CONTRIBUTING.md for details.
##Credits rails_autocomplete was originally written by Omar Abdel-Wahab.
rails_autocomplete is maintained and funded by Raya Social Media.
rails_autocomplete is Copyright © 2013 Raya Social Media. It is free software, and may be redistributed under the terms specified in the LICENSE file.
FAQs
Unknown package
We found that rails_autocomplete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.