-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating nested attributes #1
Comments
How can I access to value? I need assign it to name: %a{href: '#', class: "editable_#{post.id}", 'data-url' => post_path(post)}= post.name
:javascript
$(".editable_#{post.id}").editable({
type: 'text',
title: 'Enter username',
params: {
post: {
post_translations_attributes:{
id: "#{post.translation.id}",
name: 'This value'
}
}
}
}); |
Thank you for using! With a head of the repo, how about this: gem 'bootstrap-editable-rails', github: 'tkawa/bootstrap-editable-rails' <% @member.posts.each_with_index do |post, i| %>
<a href="#" class="post_body" data-type="text" data-resource="member[posts_attributes][<%= i %>]" data-id="<%= post.id %>" data-name="body" data-url="/members/1" data-original-title="Enter body">body</a>
<% end %> $(".post_body").editable({
params: function(params) { // for ovewrite params
params[$(this).data('resource') + '[id]'] = $(this).data('id');
return params;
}
}); I'm going to think of a better spec for nested attributes. |
tkawa - I don't understand the status of this issue. Are we supposed to be able to use the above code to fix the issue of editable columns in tables? It doesn't fix it for me. I used the code above. I now get a popup for every row. I can change the data. But, the record doesn't get changed in the database. |
Hi! Was there ever a feature added that allowed for editing nested attributes? It's working great for everything but my nested attributes. :-/ |
Hi,
this gem is working great and nice tutorial how to implement it, but how can I update nested attributes?
Thanks
The text was updated successfully, but these errors were encountered: