{"id":20782795,"url":"https://github.com/yamasolutions/block-editor-sample","last_synced_at":"2026-04-11T16:05:51.152Z","repository":{"id":49532623,"uuid":"348524746","full_name":"yamasolutions/block-editor-sample","owner":"yamasolutions","description":"Block editor example using the Block Editor gem for Ruby on Rails","archived":false,"fork":false,"pushed_at":"2021-06-15T19:24:18.000Z","size":170,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T09:21:14.391Z","etag":null,"topics":["block-editor","rails","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://block-editor-rails.herokuapp.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yamasolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-16T23:49:25.000Z","updated_at":"2021-11-10T17:50:28.000Z","dependencies_parsed_at":"2022-09-19T10:31:05.622Z","dependency_job_id":null,"html_url":"https://github.com/yamasolutions/block-editor-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamasolutions%2Fblock-editor-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamasolutions%2Fblock-editor-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamasolutions%2Fblock-editor-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamasolutions%2Fblock-editor-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yamasolutions","download_url":"https://codeload.github.com/yamasolutions/block-editor-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243125638,"owners_count":20240276,"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":["block-editor","rails","ruby","ruby-on-rails"],"created_at":"2024-11-17T14:14:45.288Z","updated_at":"2025-12-24T16:47:41.684Z","avatar_url":"https://github.com/yamasolutions.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Block Editor for Ruby on Rails - Sample\n\nThis is a very basic sample host application for the [Block Editor Ruby on Rails gem](https://github.com/yamasolutions/block-editor)\n\nIt was created by following these steps;\n* Create new Rails application\n```\nrails new block_editor_sample\n```\n\n* Generate Post scaffold\n```\nrails generate scaffold Post title:string\n```\n\n* Add Block Editor gem and bundle\n```\n// Gemfile\ngem 'block_editor'\n```\n\n* Add Block Editor migrations \u0026 migrate\n```\nrails block_editor:install:migrations\nrails db:migrate\n```\n\n* Add `include BlockEditor::Listable` to the `Post` model\n```\nclass Post \u003c ApplicationRecord\n  include BlockEditor::Listable\nend\n```\n\n* Add the block editor to `Post` form;\n```\n  \u003c%= form.fields_for :active_block_list do |block_list| %\u003e\n    \u003c%= BlockEditor::Instance.render(block_list) %\u003e\n  \u003c% end %\u003e\n```\n\nUpdated trusted post parameters and specifically set the listable within the PostsController;\n```\n  # Only allow a list of trusted parameters through.\n  def post_params\n    params.require(:post).permit(:title, active_block_list_attributes: [ :id, :content ])\n  end\n```\n\n```\n@post.active_block_list.listable = @post\n```\n\n* Add the block editor Javascript and styles within `HEAD` tag\n```\n  \u003c%= javascript_pack_tag 'block_editor/application', 'data-turbolinks-track': 'reload', webpacker: 'BlockEditor' %\u003e\n  \u003c%= stylesheet_pack_tag 'block_editor/application', 'data-turbolinks-track': 'reload', webpacker: 'BlockEditor' %\u003e\n```\n\n* Install Bootstrap. Note this is only required if you want to use the base styles that BlockEditor provides as they depend on Bootstrap\n```\nyarn add bootstrap\n```\n\n* Add SCSS imports for Bootstrap \u0026 base block editor styles. [Check them out here](https://github.com/yamasolutions/block-editor-sample/blob/master/app/assets/stylesheets/application.scss)\n\n* Win\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamasolutions%2Fblock-editor-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyamasolutions%2Fblock-editor-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamasolutions%2Fblock-editor-sample/lists"}