rails / in_place_editing Goto Github PK
View Code? Open in Web Editor NEWNOTICE: official repository moved to https://github.com/amerine/in_place_editing
Home Page: http://rubyonrails.org
NOTICE: official repository moved to https://github.com/amerine/in_place_editing
Home Page: http://rubyonrails.org
InPlaceEditing ============== Example: # Controller class BlogController < ApplicationController in_place_edit_for :post, :title end # View <%= in_place_editor_field :post, 'title' %> Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
Hello,
I am very new to RoR. I am using Rails 3 and I installed this plugin with a quick scaffolded app. When I go to edit in place, it just says "saving..." but it doesn't actually commit the change. When I use the regular edit page, the change does in fact save. Is there any more information on how to implement this plugin? I think I am missing something.
Many thanks!
This works when I use it in a scaffold edit view but it doesn't work when I use it in the index scaffold view? What is this?
I get an error similar to this:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
My view code for index is standard like this:
<% @dogs.each do |dog| %>
<%= in_place_editor_field :dog, 'age' %> ....The problem is in this code:
def in_place_editor_field(object, method, tag_options = {}, in_place_editor_options = {})
instance_tag = ::ActionView::Helpers::InstanceTag.new(object, method, self)
How can I adapt this to work in my index view?
Rails 3.0 deprecated the default route that makes all public controller methods reachable. This plug-in relies on set_* methods being accessible, which means I have to list them in both the controller and the route table. It doesn't seem very DRY to me, but I can't think of a good way to remove the redundancy.
Help, please?
Thanks,
Victor
In Rails 4 throws that error when calling in_place_editor_field
, it must be that InstanceTag
class doesn't exist in Rails 4, it's been replaced by a module called ActiveModelInstanceTag
.
My validations are being ignored by in_place_edit. Is this normal?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.