Oluwayomi Oluwadara
2009-Dec-26 23:55 UTC
How can i cancel the effect of a command-generate controller in my app
Hellowhat command can i sue to get rid of the effect of the below command
ruby
script/generate scaffold \ user name:string hashed_password:string salt:string
Regards and Respects,
Kindness in thought leads to wisdom.
Kindness in speech leads to eloquence.
Kindness in action leads to love.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2009-Dec-27 00:31 UTC
Re: How can i cancel the effect of a command-generate controller in my app
On Sat, Dec 26, 2009 at 3:55 PM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>wrote:> Hello > what command can i sue to get rid of the effect of the below command > > > ruby script/generate scaffold \ user name:string hashed_password:string > salt:string > > Regards and Respects, > * > * >Oluwayomi, you can do the following: ruby script/generate user name:string hash_password:string salt:string Note: The above code will generate a model called User. Good luck, -Conrad -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2009-Dec-27 00:32 UTC
Re: How can i cancel the effect of a command-generate controller in my app
On Sat, Dec 26, 2009 at 4:31 PM, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Dec 26, 2009 at 3:55 PM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>wrote: > >> Hello >> what command can i sue to get rid of the effect of the below command >> >> >> ruby script/generate scaffold \ user name:string hashed_password:string >> salt:string >> >> Regards and Respects, >> * >> * >> > > Oluwayomi, you can do the following: > > ruby script/generate user name:string hash_password:string salt:string > >ruby script/generate model user name:string hash_password:string salt:string> Note: The above code will generate a model called User. > > Good luck, > > -Conrad > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2009-Dec-27 01:01 UTC
Re: How can i cancel the effect of a command-generate controller in my app
On Sat, Dec 26, 2009 at 3:55 PM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> what command can i sue to get rid of the effect of the below command > > ruby script/generate scaffold \ user name:string hashed_password:string salt:stringLook at the list of files that were generated and remove them :-) (You''ll also need to edit routes.rb) And for the future -- if you were using a versioning system like git, you could create a branch when you were adding a model, and if it didn''t suit you afterwards, you could just delete the branch. FWIW! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rilindo Foster
2009-Dec-27 01:07 UTC
Re: How can i cancel the effect of a command-generate controller in my app
Are you asking about how to reverse this? There is a destroy script available
with the rails install:
yvaine:reverseblade rilindo$ ruby script/destroy
Usage: script/destroy generator [options] [args]
Rails Info:
-v, --version Show the Rails version number and quit.
-h, --help Show this help message and quit.
General Options:
-p, --pretend Run but do not make any changes.
-f, --force Overwrite files that already exist.
-s, --skip Skip files that already exist.
-q, --quiet Suppress normal output.
-t, --backtrace Debugging: show backtrace on errors.
-c, --svn Modify files with subversion. (Note: svn
must be in path)
-g, --git Modify files with git. (Note: git must be
in path)
Installed Generators
Builtin: controller, helper, integration_test, mailer, metal, migration,
model, observer, performance_test, plugin, resource, scaffold, session_migration
script/generate command. For instance, ''script/destroy migration
CreatePost''
will delete the appropriate XXX_create_post.rb migration file in db/migrate,
while ''script/destroy scaffold Post'' will delete the posts
controller and
views, post model and migration, all associated tests, and the map.resources
:posts line in config/routes.rb.
For instructions on finding new generators, run script/generate.
yvaine:reverseblade rilindo$
Same options as generate, except it cleans out your generated files.
On Dec 26, 2009, at 6:55 PM, Oluwayomi Oluwadara wrote:
> Hello
> what command can i sue to get rid of the effect of the below command
>
>
> ruby script/generate scaffold \ user name:string hashed_password:string
salt:string
>
>
> Regards and Respects,
>
>
> Kindness in thought leads to wisdom.
> Kindness in speech leads to eloquence.
> Kindness in action leads to love.
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Oluwayomi Oluwadara
2009-Dec-27 14:36 UTC
Re: How can i cancel the effect of a command-generate controller in my app
what do i edit in route.rb? thanks Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love. --- On Sat, 12/26/09, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: From: Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Subject: Re: [Rails] How can i cancel the effect of a command-generate controller in my app To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Date: Saturday, December 26, 2009, 5:01 PM On Sat, Dec 26, 2009 at 3:55 PM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> what command can i sue to get rid of the effect of the below command > > ruby script/generate scaffold \ user name:string hashed_password:string salt:stringLook at the list of files that were generated and remove them :-) (You''ll also need to edit routes.rb) And for the future -- if you were using a versioning system like git, you could create a branch when you were adding a model, and if it didn''t suit you afterwards, you could just delete the branch. FWIW! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2009-Dec-27 15:57 UTC
Re: How can i cancel the effect of a command-generate cont
Oluwayomi Oluwadara wrote:> what do i edit in route.rb? thanksWhatever your version control system says was changed. If you''re not using version control, download Git and start *today*. There is no excuse for working without version control. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2009-Dec-27 16:13 UTC
Re: How can i cancel the effect of a command-generate controller in my app
On Sun, Dec 27, 2009 at 6:36 AM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > what do i edit in route.rb? thanksWell, I totally forgot about script/destroy which Rilindo mentioned, so that''s certainly an easier route. However, if you need/want to do it manually, just look for a reference to the model you created; it''ll be pretty obvious. And really, use git for revision control and get in the habit of frequent commits; it''ll be such a time-saver when you can just prompt$ git diff config/routes.rb to find the changes... FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Oluwayomi Oluwadara
2009-Dec-27 19:30 UTC
Re: How can i cancel the effect of a command-generate controller in my app
thanks Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love. --- On Sun, 12/27/09, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: From: Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Subject: Re: [Rails] How can i cancel the effect of a command-generate controller in my app To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Date: Sunday, December 27, 2009, 8:13 AM On Sun, Dec 27, 2009 at 6:36 AM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > what do i edit in route.rb? thanksWell, I totally forgot about script/destroy which Rilindo mentioned, so that''s certainly an easier route. However, if you need/want to do it manually, just look for a reference to the model you created; it''ll be pretty obvious. And really, use git for revision control and get in the habit of frequent commits; it''ll be such a time-saver when you can just prompt$ git diff config/routes.rb to find the changes... FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Oluwayomi Oluwadara
2009-Dec-27 19:32 UTC
Re: Re: How can i cancel the effect of a command-generate cont
thanks Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love. --- On Sun, 12/27/09, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: From: Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Subject: [Rails] Re: How can i cancel the effect of a command-generate cont To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Date: Sunday, December 27, 2009, 7:57 AM Oluwayomi Oluwadara wrote:> what do i edit in route.rb? thanksWhatever your version control system says was changed. If you''re not using version control, download Git and start *today*. There is no excuse for working without version control. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick DeNatale
2009-Dec-28 13:28 UTC
Re: How can i cancel the effect of a command-generate controller in my app
On Sun, Dec 27, 2009 at 11:13 AM, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Dec 27, 2009 at 6:36 AM, Oluwayomi Oluwadara <yomidara-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: >> >> what do i edit in route.rb? thanks > > Well, I totally forgot about script/destroy which Rilindo mentioned, so > that''s certainly an easier route. > > However, if you need/want to do it manually, just look for a reference > to the model you created; it''ll be pretty obvious. > > And really, use git for revision control and get in the habit of frequent > commits; it''ll be such a time-saver when you can just > > prompt$ git diff config/routes.rb > > to find the changes... >And you can then use commands like git checkout some/file/that/changed to revert individual files to the state before the generate or git reset To reset the entire working directory to the state of the last commit. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.