How to append some action into already available controller?

how to append some action into already available controller with
corresponding views (*.rhtml) .for example

ruby/script generate controller admin action1 action2…

here admin is already available controller with some action
now ,what i want is the new actions(action1 action2…) should be
append
in admin_controller.rb and corresponding .rhtml files
(action1.rhtml,action2.rhtml…) should be created in app/views/admin/
.

any idea ?

On Dec 1, 9:10 am, Pokkai D. [email protected]
wrote:

how to append some action into already available controller with
corresponding views (*.rhtml) .for example

What’s wrong with just creating those files/methods by hand ?

Fred

Frederick C. wrote:

On Dec 1, 9:10 am, Pokkai D. [email protected]
wrote:

how to append some action into already available controller with
corresponding views (*.rhtml) .for example

What’s wrong with just creating those files/methods by hand ?

Fred

i thing the main advanstage in Rails framework compare than others is
very speed and easy implementation.

actually in some situation i want to create more than one public
definition(method) in an existing controller .

in my projects there are lots of controllers (more than 300)

for example if i want to create 5 methods with corresponding views in a
controller than ,if i do like this (ofcourse below is wrong) than my
speed is 5 to 10 times fater than manual creating…

ruby script/generate controller [-append] contro met1 met2 met3 met4 met5

and one thing i ask ,why the rails developers should not add this append
capability in controller generator ?

On 2 Dec 2007, at 05:34, Pokkai D. wrote:

Fred
in a
controller than ,if i do like this (ofcourse below is wrong) than my
speed is 5 to 10 times fater than manual creating…

ruby script/generate controller [-append] contro met1 met2 met3
met4 met5

While script/generate controller is a useful starting point
(especially when you’re not quite sure what the naming conventions
are, what files go where etc…) in my experience unless the methods
and views were completely empty the bulk of the effort is in writing
them and the time spent actually creating the files is rather
negligible.

and one thing i ask ,why the rails developers should not add this
append
capability in controller generator ?

The generators in general tend to create new files rather than edit
them. Off the top of my head I’d say that’s because it’s a lot easier
to add things then it is to edit existing things. That said if you can
find a way to make this all work nicely then you can always submit a
patch.

Fred