Rails - Extract Partial (Extract_Partial.bsh v0.1 by Alexandre da Silva)
Submitted by Monday, 15 September, 2008 - 13:26
on
Extract selected region from current buffer as a partial, ask for a name and create a new buffer with _(given_name).(current_extension), then insert a <%= render :partial => 'given_name' %>
My shortcut: CS + p
Example:
you are working in a file index.html.erb, select some region and activate extract partial macro.
it will ask you for a name to partial, you inform "list_item", then, a new buffer will be created
with name "_list_item.html.erb" with the content of selection, than the selection will be replaced
by the command "<%= render :partial => 'list_item' %>".
enjoy.
Updated on 09/15/2008 - 13:26
Downloads: 1107