At the beginning I thought, great my process described in my post how to setup activescaffold with rails 3 is quite easy and only consists of a view steps. Unfortunetly, I had to realize that even these few steps are too many if you have to do that frequently.
Therefore I ve tried to further reduce steps it takes to install my little howto application. I ve managed to get it down to one step (if you do not count downloading a ruby script
)
That s a real time safer for me and will be for you if you are following my posts and try these things out. In addition it can be used to install any new activescaffold enabled rails 3 app.
You may find that install script at the following location: One Step Activescaffold
If you want to try it out just download the following file: https://github.com/vhochstein/one_step_active_scaffold/raw/master/one_step_activescaffold.rb and run it on your computer without any options.
At the end you are a proud creator of my little how-to application. you just have to call ‘rails s’ to start the application.
If you like it you can use it even for your own apps. This little script takes several arguments, these empower you to set application name, js_library, your preferred database system and db user and password.
If you would like to create your own models instead of my player and team ones… Sure no problem. You just have to create a special file in the same directory which includes the required commands to create these models.
Let’s take a look at some examples:
ruby one_step_activescaffold_app.rb
That s the default, which creates my little how-to.
ruby one_step_activescaffold_app.rb my_new_app jquery mysql
Creates my little how-to with the name ‘my_new_app’ using mysql and jquery.
ruby one_step_activescaffold_app.rb my_new_app jquery postgres john top_secret
Same as before, but using postgres and db_user is ‘john’ and password is ‘top_secret’
model_setup.rb: puts %x[rails g active_scaffold coach name:string] ruby one_step_activescaffold_app.rb
Creates my little how-to, but instead of creating team and player model, we create a coach model.
ActiveScaffold Gem « Vhochstein's Blog
Feb 12, 2011 @ 09:41:59
ActiveScaffold: FieldSearch Column Overrides « Vhochstein's Blog
May 14, 2011 @ 11:53:16
May 26, 2011 @ 13:50:03
THe above link, http://github.com/vhochstein/one_step_active_scaffold/raw/master/one_step_activescaffold
does not seem to work. How does one actually configure jquery if it a gem?
May 27, 2011 @ 12:53:29
Thanks a lot. fixed that link.
if you use one_step_activescaffold you just have to call it with jquery parameter as described in the blog.
Just create an example app and take a look at corresponding initializer file.
Hope that helps
Dec 26, 2011 @ 10:36:36
i still got the problem: “Could not find generator active_scaffold_setup”