Comments (4)
Would you show me the code (HTML) you wrote?
from bootstrap-editable-rails.
Sure,
I would appreciate the help!!
Cost Answers
<% @costproject.costdetails.each_with_index do |costdetail, i| %> <% if costdetail.contact_id != nil %> <% else %> <% end %> <% end %>Question | Answer | Contact | Submit Date | |
---|---|---|---|---|
<%= costdetail.costline.line_name %> | <%= textarea_format(costdetail.answer) %> | <%= costdetail.contact.contact_full_name %> | <%= costdetail.submit_date %> |
This is the js.coffee
$(document).ready ->
$(".costdetail_body").editable params: (params) ->
params[$(this).data("resource") + "[id]"] = $(this).data("id")
params
Thanks,
David Burton
On Jan 10, 2013, at 8:45 PM, Toru KAWAMURA [email protected] wrote:
Would you show me the code (HTML) you wrote?
—
Reply to this email directly or view it on GitHub.
from bootstrap-editable-rails.
Since this seems not to be "nested attributes" according to data-url="/costdetails/<%= costdetail.id %> "
, please do not use the method of #1.
If it is "nested attributes", it should have written in this way.
class Costproject < ActiveRecord::Base
accepts_nested_attributes_for :costdetails
end
from bootstrap-editable-rails.
Toru,
Thanks for the help!!
I'm sorry to be a bother.
I have changed my costproject model to contain accepts_nested_attributes_for :cost details
Now, when I edit a column, it adds a new record instead of replacing the one I'm trying to edit.
David Burton
On Jan 10, 2013, at 9:16 PM, Toru KAWAMURA [email protected] wrote:
Since this is not "nested attributes" according to data-url="/costdetails/<%= costdetail.id %> ", please do not use the method of #1.
If it is "nested attributes", it should have written in this way.class Costproject < ActiveRecord::Base
accepts_nested_attributes_for :costdetails
end
—
Reply to this email directly or view it on GitHub.
from bootstrap-editable-rails.
Related Issues (19)
- Updating nested attributes HOT 4
- 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
- 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.