Hi,

I have a simple boolean column that I have a field over ride in place on to
display an image rather than True/False.

 If I remove the override I can turn on inplace_edit and things work just
fine.

When I have the override in place it looks like I need to generate the
necessary attributes on the HTML code, and it looks like that I need to
include the dynamically generated javascript to enable the inplace editor
action.

Is there a helper method that would include the JS or did I miss something.

Here is the code that I use to enable the HTML portion of my inplace_editor
for my boolean field.

  def sidebar_active_column(record)
    content_tag(
      :span,
      record.active == true ?  image_tag("/images/icons/check.ico", :alt =>
"Yes") : image_tag("/images/icons/cross.png", :alt => "No"),
      { :class=>"in_place_editor_field",
        
:id=>"as_#{record.class.pluralize}-update_column-#{record.id}-active-cell",
      #  :style=>"background-color: rgb(255, 255, 153);"},
        :title=>"Click to edit"
      }
    )
  end


A similar question: I have several field_override that returns something
that I would like to display as a link that AS would open in a nested
action. Are there any helpers or sections of the code to look at to generate
those links or it the best approach just to read and mimic what AS does ?


-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to