{"id":18080106,"url":"https://github.com/jimmycuadra/jquery-tmpl-rails","last_synced_at":"2025-04-12T14:20:48.797Z","repository":{"id":56879361,"uuid":"2183898","full_name":"jimmycuadra/jquery-tmpl-rails","owner":"jimmycuadra","description":"jQuery Templates for the Rails asset pipeline.","archived":false,"fork":false,"pushed_at":"2016-01-20T06:46:34.000Z","size":168,"stargazers_count":46,"open_issues_count":2,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T20:14:51.605Z","etag":null,"topics":["jquery","jquery-templates","rails","ruby","sprockets","unmaintained"],"latest_commit_sha":null,"homepage":"http://rubygems.org/gems/jquery-tmpl-rails","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimmycuadra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-10T07:24:01.000Z","updated_at":"2019-08-13T14:48:42.000Z","dependencies_parsed_at":"2022-08-20T23:10:47.337Z","dependency_job_id":null,"html_url":"https://github.com/jimmycuadra/jquery-tmpl-rails","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fjquery-tmpl-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fjquery-tmpl-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fjquery-tmpl-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fjquery-tmpl-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimmycuadra","download_url":"https://codeload.github.com/jimmycuadra/jquery-tmpl-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578874,"owners_count":21127714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jquery","jquery-templates","rails","ruby","sprockets","unmaintained"],"created_at":"2024-10-31T13:05:43.858Z","updated_at":"2025-04-12T14:20:48.752Z","avatar_url":"https://github.com/jimmycuadra.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code Climate](https://codeclimate.com/github/jimmycuadra/jquery-tmpl-rails.png)](https://codeclimate.com/github/jimmycuadra/jquery-tmpl-rails) [![endorse](http://api.coderwall.com/jimmycuadra/endorsecount.png)](http://coderwall.com/jimmycuadra)\n\n# jquery-tmpl-rails\n\nThis gem adds the jQuery Templates plugin and a corresponding Sprockets engine to the asset pipeline in Rails \u003e= 3.1 applications.\n\n## Installation\n\nAdd it to your Gemfile and run `bundle`.\n\n## Usage\n\njQuery templates will be recognized by Sprockets with the `.tmpl` extension. Place them anywhere in the Sprockets load path.\n\n```html\n\u003c!-- app/assets/javascripts/templates/author.tmpl --\u003e\n\u003cdiv class=\"author\"\u003e${name}\u003c/div\u003e\n```\n\nIn your application's JavaScript manifest file, require the jQuery Templates plugin followed by your templates. The templates are compiled and named with their Sprockets logical path:\n\n```javascript\n//= require jquery-tmpl\n//= require_tree ./templates\n\n$.tmpl(\"templates/author\", { name: \"Jimmy\" }).appendTo(\"#author\");\n```\n\n## Configuration\n\nIf the path to all of your templates have a common prefix that you prefer is not included in the template's name, you can set this option in `config/application.rb`:\n\n```ruby\nconfig.jquery_templates.prefix = \"templates\"\n```\n\nThat would change the previous example to this:\n\n```javascript\n$.tmpl(\"author\", { name: \"Jimmy\" }).appendTo(\"#author\");\n```\n\nThe prefix can also be a regular expression. For example, to use only the name of the file for the template name, regardless of directory structure:\n\n```ruby\nconfig.jquery_templates.prefix = %r{([^/]*/)*}\n```\n\nHappy templating!\n\n## Acknowledgements\n\nThe Sprockets engine was originally derived from the [sprockets-jquery-tmpl](https://github.com/rdy/sprockets-jquery-tmpl) gem. If you want a similar mechanism for use outside of Rails, take a look at this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycuadra%2Fjquery-tmpl-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmycuadra%2Fjquery-tmpl-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycuadra%2Fjquery-tmpl-rails/lists"}