{"id":27734452,"url":"https://github.com/railsapps/rails_apps_pages","last_synced_at":"2025-06-12T14:05:16.325Z","repository":{"id":16597893,"uuid":"19352378","full_name":"RailsApps/rails_apps_pages","owner":"RailsApps","description":"Add pages to a Rails application, including controllers, views, routing, and tests.","archived":false,"fork":false,"pushed_at":"2016-10-16T07:38:42.000Z","size":190,"stargazers_count":23,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T13:11:27.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/RailsApps.png","metadata":{"files":{"readme":"README.textile","changelog":"CHANGELOG.textile","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-01T17:42:33.000Z","updated_at":"2020-06-18T02:28:50.000Z","dependencies_parsed_at":"2022-09-24T08:40:29.985Z","dependency_job_id":null,"html_url":"https://github.com/RailsApps/rails_apps_pages","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/RailsApps/rails_apps_pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RailsApps%2Frails_apps_pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RailsApps%2Frails_apps_pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RailsApps%2Frails_apps_pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RailsApps%2Frails_apps_pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RailsApps","download_url":"https://codeload.github.com/RailsApps/rails_apps_pages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RailsApps%2Frails_apps_pages/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259479494,"owners_count":22864358,"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":"2025-04-28T13:10:36.694Z","updated_at":"2025-06-12T14:05:16.298Z","avatar_url":"https://github.com/RailsApps.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. !http://railsapps.github.io/images/rails-36x36.jpg(RailsApps Page Gem)! RailsApps Pages Gem\n\nUse this gem to add pages to a Rails application, including controllers, views, routing, and tests.\n\nRailsApps Pages is a utility gem to use during development. You can remove it after generating the pages you need. It was originally written for use by the \"Rails Composer\":http://railsapps.github.io/rails-composer/ tool. Use Rails Composer to build any of the \"RailApps example applications\":http://railsapps.github.io/ for use as starter apps.\n\nIf you like the RailsApps Pages gem, you might be interested in the \"RailsLayout gem\":https://github.com/RailsApps/rails_layout which generates Rails application layout files for various front-end frameworks such as Bootstrap and Foundation.\n\nh4. !http://railsapps.github.io/images/join/join-railsapps.png(Join RailsApps)!:http://railsapps.github.io/\n\nh4. From the RailsApps Project\n\nThe \"RailsApps\":http://railsapps.github.io/ open source project offers starter applications and tutorials for Rails developers. Generate the applications with the Rails Composer tool.\n\nAll the code is explained in the Capstone Rails Tutorials. You can purchase the \"Capstone Rails Tutorials\":https://tutorials.railsapps.org/ to support the project.\n\nh2. Install the Gem\n\nAdd the gem to your Rails application Gemfile:\n\n\u003cpre\u003e\ngroup :development do\n  gem 'rails_apps_pages'\nend\n\u003c/pre\u003e\n\nYou don't need the RailsApps Pages gem deployed to production, so put it in the @development@ group.\n\nIf you want to use a newer unreleased version from GitHub:\n\n\u003cpre\u003e\ngroup :development do\n  gem 'rails_apps_pages', github: 'RailsApps/rails_apps_pages'\nend\n\u003c/pre\u003e\n\nh4. Use Bundler\n\nUse Bundler to install the gems:\n\n\u003cpre\u003e\n$ bundle install\n\u003c/pre\u003e\n\nh2. Generate a Home Page\n\nTo run the generator and create a home page:\n\n\u003cpre\u003e\n$ rails generate pages:home\n\u003c/pre\u003e\n\nThe generator will create:\n\n* app/views/visitors/index.html.erb\n* app/controllers/visitors_controller.rb\n* plus tests (if RSpec is installed)\n\nIt will add a route to the *config/routes.rb* file:\n\n\u003cpre\u003e\nroot :to =\u003e \"visitors#index\"\n\u003c/pre\u003e\n\nWhy a \"Visitors\" controller? Why not a \"Home\" controller or \"Welcome\" controller? Those names are acceptable. But the home page often implements a user story for a persona named \"visitor,\" so a \"Visitors\" controller is appropriate.\n\nh2. Generate an \"About\" Page\n\nTo run the generator and create an \"About\" page:\n\n\u003cpre\u003e\n$ rails generate pages:about\n\u003c/pre\u003e\n\nThe generator will create:\n\n* app/views/pages/about.html.erb\n* plus tests (if RSpec is installed)\n\nYou'll need to install the \"high_voltage gem\":https://github.com/thoughtbot/high_voltage for the \"About\" page. The high_voltage gem makes it easy to add pages with static content (text that doesn't change), incorporating a site-wide application layout. The high_voltage gem provides the controller and routes needed to display any pages found in the *app/views/pages/* folder.\n\nh2. Generate User Pages Requiring Authentication\n\nIf you have a User model and authentication with Devise or OmniAuth, you can add pages to display a list of users or each user's profile, restricted to signed in users.\n\nTo run the generator and create pages to accompany a User model:\n\n\u003cpre\u003e\n$ rails generate pages:users\n\u003c/pre\u003e\n\nThe generator will create:\n\n* app/controllers/users_controller.rb\n* app/controllers/visitors_controller.rb\n* app/views/users/_user.html.erb\n* app/views/users/index.html.erb\n* app/views/users/show.html.erb\n* app/views/visitors/index.html.erb\n\nIt will also add routes to the *config/routes.rb* file.\n\nh2. Generate User Pages Requiring Authorization\n\nIf you have a User model, authentication with Devise, and authorization with Pundit, you can add pages to display a list of users, restricted to an administrator. Each user can see his or her own profile if logged in.\n\nTo run the generator and create pages to accompany a User model with Pundit authorization:\n\n\u003cpre\u003e\n$ rails generate pages:authorized\n\u003c/pre\u003e\n\nAll files are identical to the @rails generate pages:users@ generator, except:\n\n* app/views/users/_user.html.erb\n* app/controllers/users_controller.rb\n* app/policies/user_policy.rb\n* plus tests (if RSpec is installed)\n\nh2. Clean a Gemfile\n\nRemove commented lines and multiple blank lines from a Gemfile:\n\n\u003cpre\u003e\n$ rails generate clean:gemfile\n\u003c/pre\u003e\n\nh2. Clean a Routes File\n\nRemove commented lines and multiple blank lines from the file *config/routes.rb*:\n\n\u003cpre\u003e\n$ rails generate clean:routes\n\u003c/pre\u003e\n\nh2. Generate Analytics Files\n\nAdd a file containing JavaScript code to set up page-view tracking with \"Google Analytics\":http://www.google.com/analytics/:\n\n\u003cpre\u003e\n$ rails generate analytics:google\n\u003c/pre\u003e\n\nAdd a file containing JavaScript code to set up page-view tracking with \"Segment.io\":https://segment.io/:\n\n\u003cpre\u003e\n$ rails generate analytics:segmentio\n\u003c/pre\u003e\n\nh2. Generate Bootstrap Page Layouts\n\nSee the \"Start Bootstrap\":http://startbootstrap.com/template-categories/all/ site for a collection of Bootstrap themes and templates that you can generate with the rails_apps_pages gem.\n\nHere are the Bootstrap page layouts you can generate:\n\n\u003cpre\u003e\n 1)  None\n 2)  1 Col Portfolio\n 3)  2 Col Portfolio\n 4)  3 Col Portfolio\n 5)  4 Col Portfolio\n 6)  Bare\n 7)  Blog Home\n 8)  Business Casual\n 9)  Business Frontpage\n10)  Clean Blog\n11)  Full Width Pics\n12)  Heroic Features\n13)  Landing Page\n14)  Modern Business\n15)  One Page Wonder\n16)  Portfolio Item\n17)  Round About\n18)  Shop Homepage\n19)  Shop Item\n20)  Simple Sidebar\n21)  Small Business\n22)  Stylish Portfolio\n23)  The Big Picture\n24)  Thumbnail Gallery\n\u003c/pre\u003e\n\nTo see the commands that generate the Bootstrap page layouts, run:\n\n\u003cpre\u003e\n$ rails g\n\u003c/pre\u003e\n\nh2. Issues\n\nAny issues? Please create an \"issue\":http://github.com/RailsApps/rails_apps_pages/issues on GitHub. Reporting issues (and patching!) helps everyone.\n\nh2. Credits\n\nDaniel Kehoe maintains this gem as part of the \"RailsApps project\":http://railsapps.github.io/.\n\nPlease see the \"CHANGELOG\":https://github.com/RailsApps/rails_apps_pages/blob/master/CHANGELOG.textile for a list of contributors.\n\nIs the gem useful to you? Follow the project on Twitter: \"@rails_apps\":http://twitter.com/rails_apps. I'd love to know you were helped out by the gem.\n\nh2. MIT License\n\n\"MIT License\":http://www.opensource.org/licenses/mit-license\n\nCopyright © 2014 Daniel Kehoe\n\nh2. Useful Links\n\n|_. Getting Started |_. Articles |_. Tutorials |\n| \"Ruby on Rails\":http://railsapps.github.io/ruby-and-rails.html |                                     \"Analytics for Rails\":http://railsapps.github.io/rails-google-analytics.html |                 \"Rails Bootstrap\":http://railsapps.github.io/twitter-bootstrap-rails.html |\n| \"What is Ruby on Rails?\":http://railsapps.github.io/what-is-ruby-rails.html |                        \"Heroku and Rails\":http://railsapps.github.io/rails-heroku-tutorial.html |                     \"Rails Foundation\":http://railsapps.github.io/rails-foundation.html |\n| \"Learn Ruby on Rails\":http://learn-rails.com/learn-ruby-on-rails.html |                              \"JavaScript and Rails\":http://railsapps.github.io/rails-javascript-include-external.html |     \"RSpec Tutorial\":http://railsapps.github.io/rspec.html |\n| \"Rails Tutorial\":https://tutorials.railsapps.org/rails-tutorial |                                    \"Rails Environment Variables\":http://railsapps.github.io/rails-environment-variables.html |    \"Rails Devise Tutorial\":http://railsapps.github.io/tutorial-rails-devise.html |\n| \"Ruby on Rails Tutorial for Beginners\":http://learn-rails.com/ruby-on-rails-tutorial-for-beginners | \"Git and GitHub with Rails\":http://railsapps.github.io/rails-git.html |                        \"Devise RSpec\":http://railsapps.github.io/tutorial-rails-devise-rspec-cucumber.html |\n| \"Install Ruby on Rails\":http://railsapps.github.io/installing-rails.html |                           \"Send Email with Rails\":http://railsapps.github.io/rails-send-email.html |                     \"Devise Bootstrap\":http://railsapps.github.io/tutorial-rails-bootstrap-devise-cancan.html |\n| \"Install Ruby on Rails - Mac OS X\":http://railsapps.github.io/installrubyonrails-mac.html |          \"Haml and Rails\":http://railsapps.github.io/rails-haml.html |                                  \"Rails Membership Site with Stripe\":https://tutorials.railsapps.org/rails-stripe-membership-saas |\n| \"Install Ruby on Rails - Ubuntu\":http://railsapps.github.io/installrubyonrails-ubuntu.html |         \"Rails Application Layout\":http://railsapps.github.io/rails-default-application-layout.html |  \"Rails Subscription Site with Recurly\":https://tutorials.railsapps.org/rails-recurly-subscription-saas |\n| \"Ruby on Rails - Nitrous.io\":http://railsapps.github.io/rubyonrails-nitrous-io.html |                \"HTML5 Boilerplate for Rails\":http://railsapps.github.io/rails-html5-boilerplate.html |        \"Startup Prelaunch Signup Application\":https://tutorials.railsapps.org/rails-prelaunch-signup |\n| \"Update Rails\":http://railsapps.github.io/updating-rails.html |                                      \"Example Gemfiles for Rails\":http://railsapps.github.io/rails-3-2-example-gemfile.html |\n| \"Rails Composer\":http://railsapps.github.io/rails-composer/ |                                        \"Rails Application Templates\":http://railsapps.github.io/rails-application-templates.html |\n| \"Rails Examples\":http://railsapps.github.io/ |                                                       \"Rails Product Planning\":http://railsapps.github.io/rails-product-planning.html |\n| \"Rails Starter Apps\":http://railsapps.github.io/rails-examples-tutorials.html |                      \"Rails Project Management\":http://railsapps.github.io/rails-project-management.html |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsapps%2Frails_apps_pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frailsapps%2Frails_apps_pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsapps%2Frails_apps_pages/lists"}