开发者

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开发者_Python百科">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


Use this plugin.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜