Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:58:24+00:00 2026-05-28T07:58:24+00:00

I have an index page with a free form comment field. The Comment field

  • 0

I have an index page with a free form comment field. The Comment field is part of another model that is not associated– long story, part me, part user.

What I need to figure out is what to use to do that. I ran into a problem with Best In Place (here) and am not sure if that is a resolvable path.

So, does anyone have a tutorial or advice to point me to regarding doing in place editing for an index?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:58:24+00:00Added an answer on May 28, 2026 at 7:58 am

    What I wound up doing was:

    Create a row in the table that was a TextArea and assigned the text area a class:

    <td class="textcell" id="<%= crb_agenda.key %>"><%= text_area_tag 'comment', if @pdms_comment.user_comments.nil? == false then @pdms_comment.user_comments end, :rows => 3, :id => "_" + @pdms_comment.jira_key %><%= link_to "[+]", "#", :class => "comment_row" %></td>
    

    [sorry I am having a devil of a time with the formatting for this]

    Create a controller for the updating of the field in the DB:

      def comment_push
        @jira_key = params[:key]
        @comment = params[:comment]
        @user_name = params[:name]
        @user_pw = params[:pw]
    
        @comment_record = Comment.find_by_jira_key(@jira_key)
        @comment_record.update_attribute(:user_comments, @comment)
    
        Comment.add_comment_to_jira_ticket(@user_name, @user_pw, "MCTEST-293",@comment)
    
        respond_to do |format|
          format.js
        end
      end
     [note, this required a comment.js.erb file in the views; it was blank. Also, I created a route for it]
    

    Create a jquery function keying off of the class I assigned to the Text Area that passed in the necessary params to the route from the controller…

      $('.comment_row').live("click", function() {
            var user_name = $('#user_name').val();
            var user_pw = $('#user_pw').val();
            var tr = $(this).closest("tr");
            var td = $(this).closest("td");
            var ta_id = '_' + td.attr("id");
            var comment = $('textarea#' + ta_id).val();
            $.ajax({
                url: '/crbagenda/comments/comment_push',
                type: 'GET',
                data: 'key=' + td.attr("id") + "&name=" + user_name + "&pw=" + user_pw + "&comment=" + comment
            });
    

    And that took care of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a directory on my webserver. It does not have an index page.
I have a index.php page that is the main page. All pages are included
i have a question, i have a index.php page that is the intro of
I have an index page that I want to show all the users' profile
I have an index page that detects if users have JavaScript and cookies enabled
So I have the index.php page. <?php session_start(); if (!isset($_SESSION['var1'])) { echo session not
I have my index page which posts a single entry instead of the usual
I have an index page index.php , and when the user clicks on a
I have an index page with three links as follws. When I click the
Situation: I have an index page which loads pages into it with ajax as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.