I watching this case from Railscasts regarding Authlogic:
At 7:44 of the cast, it creates a user_session as follows:
script/generate nifty_scaffold user_session --skip-model username:string
password:string
But, when I use scaffold instead of “nifty_scaffold” which I think is
created by to the author, I get the following message:
invalid option: --skip-model
So, the author by this command was trying to skip creating the model. Is
this a command that Rails originally uses to skip a model, or has to do
with nifty_scaffold?
How can I skip creating a model?
Thamks.
Hi Abder,
You need to install the nifty-generators gem.
gem install nifty-generators
All the best,
Fidel.
Fidel V. wrote:
Hi Abder,
You need to install the nifty-generators gem.
gem install nifty-generators
All the best,
Fidel.
Thanks Fidel. Yes, I did install it, but want to use the normal
scaffold. Is there a way to skip creating the model?
Hi Abder,
I may be wrong, but I think that is a feature of the nifty_scaffold
only. I have tried with the normal scaffold, and I couldn’t find
anything similar in the documentation. So, I guess that you can’t skip
the model using the normal scaffold. I think that the normal way is
the create a controller and add the code manually, or use Ryan’s
nifty-generators. This is the one I use now.
Maybe others with more experience may advise further.
Regards,
Fidel.