lib/rails-caddy/helpers/rails_caddy_helper.rb
# actually embeds the magic that is the Rails Caddy
actually embeds the magic that is the Rails Caddy
actually embeds the magic that is the Rails Caddy
def rc_in_place_editor_field(key, value)
    tag = ::ActionView::Helpers::InstanceTag.new("rails_caddy", key, self)
    tag_options = {:tag => "span", :id => "rails_caddy_#{key}_in_place_editor", :name => "value", :class => "in_place_editor_field"}
    url = update_session_path
    url << "/" unless url.match(/\/$/)
    url << key
    tag.content_tag(tag_options.delete(:tag), value, tag_options) + rc_in_place_editor(key, tag_options[:id], url)
  end
def rc_in_place_editor_field ( key , value ) tag = :: ActionView :: Helpers :: InstanceTag . new ( "rails_caddy" , key , self ) tag_options = { :tag => "span" , :id => "rails_caddy_#{key}_in_place_editor" , :name => "value" , :class => "in_place_editor_field" } url = update_session_path url << "/" unless url . match ( / \/ $ / ) url << key tag . content_tag ( tag_options . delete ( :tag ) , value , tag_options ) + rc_in_place_editor ( key , tag_options [ :id ] , url ) end
actually embeds the magic that is the Rails Caddy
actually embeds the magic that is the Rails Caddy
# rails < 2.3 needs to be treated with kid gloves.
key
<not_specific>
value
<not_specific>