Comments (4)
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'
}
}
}
});
from bootstrap-editable-rails.
Thank you for using!
I update the repo to enable to overwrite params yesterday. (not released yet)
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.
from bootstrap-editable-rails.
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.
from bootstrap-editable-rails.
Hi! Was there ever a feature added that allowed for editing nested attributes? It's working great for everything but my nested attributes. :-/
from bootstrap-editable-rails.
Related Issues (19)
- How do you use the type = select HOT 3
- No error callback
- No way to define a 'url' and then just provide the 'pk'/'id'? HOT 1
- If I add toggle option, how to add other params ?
- Upgrade to the latest x-editable 1.4.6 HOT 1
- Join the Bootstrap-Ruby organisation! HOT 8
- Uncaught RangeError: Maximum call stack size exceeded HOT 4
- 204 response from server should not add .editable-unsaved css class to <a> HOT 1
- bootstrap-datepicker css is out of date/incorrect HOT 3
- Bootstrap2 x-editable
- Conflicts with Full Calendar plugin
- Rails4 strong parameter issue HOT 2
- Not require coffee script
- NoMethodError for bootstrap-editable-rails Sprocket 4.0.x
- Editable columns in table HOT 4
- Unable to set the option - saveonchange as "never" HOT 1
- All success responses are rendered as errors HOT 3
- Add Rails 4 compatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-editable-rails.