Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing best_in_place gem
    primarykey
    data
    text
    <p>I'm trying to use the best_in_place gem but it doesn't seem to be working. I followed the railscast tutorial but now luck. When I say it doesn't work, I mean there is no option to edit anything on the screen. Appears in the default rails manner.</p> <p>posts/show.html.erb</p> <pre><code>&lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt; &lt;p&gt; &lt;b&gt; &lt;%= best_in_place @post, :title %&gt; &lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;%= best_in_place @post ,:content, :type =&gt; :text_area %&gt; &lt;/p&gt; &lt;p&gt; &lt;b&gt;Featured:&lt;/b&gt; &lt;%= best_in_place @post , :featured, :type =&gt; :check_box %&gt; &lt;/p&gt; &lt;%= link_to 'Edit', edit_post_path(@post) %&gt; | &lt;%= link_to 'Back', posts_path %&gt; </code></pre> <p>posts.js.coffee</p> <pre><code># Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ jQuery -&gt; $('.best_in_place').best_in_place() </code></pre> <p>application.js</p> <pre><code>// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require jquery //= require jquery_ujs //= require jquery.purr //= require best_in_place //= require_tree </code></pre> <p>.</p> <p>gemfile</p> <pre><code>source 'http://rubygems.org' gem 'best_in_place' gem 'rails', '3.1.3' gem 'pg' gem "paperclip" group :assets do gem 'sass-rails', '~&gt; 3.1.5' gem 'coffee-rails', '~&gt; 3.1.1' gem 'uglifier', '&gt;= 1.0.3' end gem 'jquery-rails' group :test do # Pretty printed test output gem 'turn', '0.8.2', :require =&gt; false end </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload