useranon
useranon

Reputation: 29514

How to update the hash column in rails by inplace editing

HI ,

i am having a in_place editor in my view file like

    <div>
          <h6>Employee ID</h6>
       <p> 
          <span id="edit_employee_id">my emp id</span>
          <a href="#" class="short_description_text btn" id="edit_employee_id_link"> <%= custom_button("change") %> </a>
          <%= in_place_editor "edit_employee_id", :url => {:controller => :users, :action => 'set_user_empid', :id => @user} %>
       </p>
  </div>

I am trying to update my table User_detail (id,User_id,additional_info) where additional_info is a hash (:empid : "",:prjtname : "")

i already have the entry for all the users in the User_detail table

how to update the empid in the additional_info hash by this in_place editor ..

I dont know how to do this ? Please give suggestions

Upvotes: 0

Views: 299

Answers (1)

Zach Inglis
Zach Inglis

Reputation: 1257

Use this plugin.

By the way, you probably want to get better at naming your attributes. project_name over prjtname

Upvotes: 1

Related Questions