Friday, January 27, 2017

How to use Active_Scaffold with Rails (Updated 19th Feb 2017)

To get started with a new Rails project
Added to Gemfile
gem 'active_scaffold'
gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: 'master' 
Run the following commands
bundle install
rails g active_scaffold:install
bundle exec rake db:create
rails g active_scaffold:resource User name:string
bundle exec rake db:migrate
Nb. In Rails5, you can use rails db:create and db:migrate 

Run the app and visit localhost:3000/users

See also https://vhochstein.wordpress.com/2010/08/28/setup-activescaffold-rails-3/

and http://vinsol.com/blog/2010/04/09/introduction-to-active-scaffold-part-i/

No comments:

Welcome to Rails.. Rails... Rails !

In 1995, I started the popular Clipper...Clipper... Clipper website (no blogs then) which was very popular and linked by virtually every Clipper-related site. When I switched to Windows via Delphi in 1997, I started the Delphi... Delphi... Delphi site. In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog. which I started on 2nd October 2007.

As at 10th June 2010, we have 13,364 unique visitors from more than 84 countries such as Angola, Andorra, Argentina, Australia, Austria, Algeria,Barbados, Bosnia and Herzogovina, Belgium, Brazil, Bulgaria, Bangladesh, Belarus, Bolivia, Chile, Cambodia, Cape Vede, Canada, China, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Egypt, Estonia, Finland, France, Guadeloupe, Guatemala, Germany, Greece, Hong Kong, Hungary, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Korea, Lithuania, Latvia, Malaysia, Mexico, Macao, Netherlands, Nepal, Norway, New Zealand, Oman, Panama, Peru, Poland, Portugal,Paraguay , Philippines, Romania, Russian Federation, Saudi Arabia, Singapore, Spain, Slovakia, Slovenia, Serbia, South Korea, Slovenia, South Africa, Spain, Switzerland, Sri Lanka, Sweden, Taiwan, Thailand, Turkey, United Arab Emirates, Ukraine, USA, UK, Venezuela, Vietnam

CCH
10th June 2010, 19:42