ct[char] # e.g. ct" to delete to the next " and go into insert mode dt[char] # dt" to delete up to next "
ci"
da)
Some useful references;
p ModelName.method(:method_name).source_location |
%h1= "Listing " + "#{resource_name}s" | |
.btn-group.pull-right | |
= link_to "All #{resource_name(item: resource_class.superclass)}s", polymorphic_path([:admin, resource_class.superclass]), class: 'btn' | |
= link_to "Add #{resource_name}", new_resource_path, class: 'btn-primary btn' | |
%br | |
%br | |
%table.table.table-bordered.table-striped#sortable{:data => {update_url: polymorphic_path([:sort, :admin, resource_class])}} |
# This has the effect of moving all the lower items up one. | |
def decrement_positions_on_lower_items(position=nil) | |
return unless in_list? | |
position ||= send(position_column).to_i | |
acts_as_list_class.unscoped.update_all( | |
"#{position_column} = (#{position_column} - 1)", "#{scope_condition} AND #{position_column} > #{position}" | |
) | |
end |
# source_for(Person.new, :update) | |
def source_for(object, method) | |
location = object.method(method).source_location | |
`mate #{location[0]} -l #{location[1]}` | |
location | |
end |
createuser -s -U $USER |
class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document | |
def build_page_content | |
build_flash_messages | |
div :id => "active_admin_content", :class => (skip_sidebar? ? "without_sidebar" : "with_sidebar") do | |
build_sidebar unless skip_sidebar? | |
build_main_content_wrapper | |
end | |
end |
[difftool "Kaleidoscope"] | |
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" | |
[diff] | |
tool = Kaleidoscope | |
[difftool] | |
prompt = false | |
[mergetool "Kaleidoscope"] | |
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
trustExitCode = true | |
[mergetool] |