{"id":17086454,"url":"https://github.com/dasch/mustache-rails","last_synced_at":"2025-05-08T19:38:18.088Z","repository":{"id":3598904,"uuid":"4663186","full_name":"dasch/mustache-rails","owner":"dasch","description":"Mustache Rails adapter","archived":false,"fork":false,"pushed_at":"2012-06-15T11:12:22.000Z","size":125,"stargazers_count":1,"open_issues_count":0,"forks_count":21,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T17:55:02.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"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/dasch.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":"2012-06-14T12:55:31.000Z","updated_at":"2015-05-26T02:50:28.000Z","dependencies_parsed_at":"2022-08-20T10:20:53.118Z","dependency_job_id":null,"html_url":"https://github.com/dasch/mustache-rails","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fmustache-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fmustache-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fmustache-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fmustache-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasch","download_url":"https://codeload.github.com/dasch/mustache-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253136419,"owners_count":21859784,"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":[],"created_at":"2024-10-14T13:28:41.594Z","updated_at":"2025-05-08T19:38:18.019Z","avatar_url":"https://github.com/dasch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mustache Rails\n\nImplements Mustache views and templates for Rails 3.x\n\n## Installation\n\n``` ruby\ngem \"mustache-rails\", :require =\u003e \"mustache/railtie\"\n```\n\nOr alternatively `require 'mustache/railtie'` in your `config/application.rb`.\n\n## Usage\n\nIn typical mustache fashion, `.mustache` templates go under `app/templates` and view `.rb` files go under `app/views`. Any view classes will be looked for under the `::Views` modules.\n\nSimple template scaffolding:\n\n``` ruby\n# app/views/layouts/application.rb\nmodule Views\n  module Layouts\n    class Application \u003c ActionView::Mustache\n      def title\n        \"Hello\"\n      end\n    end\n  end\nend\n```\n\n``` mustache\n{{ ! app/templates/layouts/application.mustache }}\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta charset='utf-8'\u003e\n  \u003ctitle\u003e{{title}}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  {{yield}}\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n``` ruby\n# app/views/users/show.rb\nmodule Views\n  module Users\n    class Show \u003c Layouts::Application\n      attr_reader :user\n    end\n  end\nend\n```\n\n``` mustache\n{{ ! app/templates/users/show.mustache }}\n{{#user}}\n  \u003ch1\u003e{{name}}\u003c/h1\u003e\n{{/user}}\n```\n\n### Optional Configuration\n\n``` ruby\n# config/application.rb\nmodule Foo\n  class Application \u003c Rails::Application\n    # Config defaults\n    config.mustache.template_path = \"app/templates\"\n    config.mustache.view_path = \"app/views\"\n    config.mustache.view_namespace = \"::Views\"\n  end\nend\n```\n\n## License\n\nCopyright \u0026copy; 2012 Joshua Peek.\n\nReleased under the MIT license. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fmustache-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasch%2Fmustache-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fmustache-rails/lists"}