{"id":21921810,"url":"https://github.com/existentialmutt/russian_hill","last_synced_at":"2025-04-19T13:56:53.467Z","repository":{"id":48954095,"uuid":"382504461","full_name":"existentialmutt/russian_hill","owner":"existentialmutt","description":"Views for CableCar","archived":false,"fork":false,"pushed_at":"2021-07-03T17:19:01.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T09:22:08.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/existentialmutt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-03T02:09:22.000Z","updated_at":"2021-07-04T01:39:31.000Z","dependencies_parsed_at":"2022-09-02T03:21:39.576Z","dependency_job_id":null,"html_url":"https://github.com/existentialmutt/russian_hill","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/existentialmutt%2Frussian_hill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Frussian_hill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Frussian_hill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Frussian_hill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/existentialmutt","download_url":"https://codeload.github.com/existentialmutt/russian_hill/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249708438,"owners_count":21313940,"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-11-28T20:27:11.212Z","updated_at":"2025-04-19T13:56:53.447Z","avatar_url":"https://github.com/existentialmutt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RussianHill\nJbuilder-like views for CableReady's cable_car.  Registers a .cablecar template extension and cablecar MIME type for a dedicated view you can use to build up operations to send in a response by calling e.g. `operations.morph`\n\n![picture of SF cable car](russianhill.jpg)\n\n\n## Usage\nExample code:\n\napp/controllers/demos_controller.rb\n```ruby\nclass DemosController \u003c ApplicationController\n\n  def index\n    respond_to do |format|\n      format.html\n      format.cablecar { @message = \"Hello World!\"}\n    end\n  end\n\nend\n```\n\napp/views/demos/index.cablecar\n```\noperations.morph(selector: \"#message\", html: @message)\n\noperations.inner_html(selector: \"#inner\", html: \"Hi inner!\")\n\noperations.outer_html(selector: \"#outer\", html: render(partial: \"message\", formats: :html))\n\n```\n\n\napp/views/demos/index.html.erb\n```html\n\u003cdiv id=\"message\"\u003e\u003c/div\u003e\n\n\u003cdiv id=\"inner\"\u003e\u003c/div\u003e\n\n\u003cdiv id=\"outer\"\u003e\u003c/div\u003e\n\n\u003cscript\u003e\n  window\n    .mrujs\n    .fetch(\"/cable_car_views\", {headers: {\"Accept\": \"text/vnd.cablecar.json\"}})\n    .then(response =\u003e response.json())\n    .then(j =\u003e {\n      CableReady.perform(j)\n    })\n\u003c/script\u003e\n\n```\n\napp/views/demos/_message.html.erb\n```html\nHello Partial!\n\n\u003cp\u003eHere's some html\u003c/p\u003e\n\n\u003cb\u003e\u003c%= @message %\u003e\u003c/b\u003e\n\n```\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'russian_hill'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install russian_hill\n```\n\n## Contributing\nContribution directions go here.\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistentialmutt%2Frussian_hill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexistentialmutt%2Frussian_hill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistentialmutt%2Frussian_hill/lists"}