Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8243891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:40:06+00:00 2026-06-07T21:40:06+00:00

I followed Ryan Bates’ railscast on the best in place gem but cannot get

  • 0

I followed Ryan Bates’ railscast on the best in place gem but cannot get it to work properly. The default value I set before_create in the user.rb model is showing up on the page but I cannot click on it to edit; it’s just showing as a static element. Although, Firebug is showing that the best_in_place javascript is being loaded in the view <head>.

application.js

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require jquery-ui
//= require jquery.purr
//= require best_in_place
//= require_tree .

users.js.coffee

jQuery ->
  $('.best_in_place').best_in_place()

user.rb

attr_accessible :email, :name, :password, :password_confirmation, :avatar, :goal
...
before_create :default_values
...
  private

    def default_values
      self.goal ||= "Write Current Goal Here"
    end

users_controller.rb

respond_to :html, :json
...
  def update
    @user = User.find(params[:id])
    respond_to do |format|
      if @user.update_attributes(params[:user])
        format.html {
          flash[:success] = "Profile updated"
          sign_in @user
          redirect_to @user
        }
        format.json { respond_with_bip(@user) }
      else
        format.html { render 'edit' }
        format.json { respond_with_bip(@user) }
      end
    end
  end

users/show.html.erb

...
<%= best_in_place @user, :goal %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:40:08+00:00Added an answer on June 7, 2026 at 9:40 pm

    In your layouts/application.html.erb .. instead of javascript_include_tag(:all) do

    javascript_include_tag(:application) 
    

    Also, make sure that users.js.coffee lives in app/assets/javascript

    Edit

    Ensure that you have the gem specified in the Gemfile and bundle installed

    gem "best_in_place"
    

    Try this, like Said Kaldybaev suggested

    //= require jquery
    //= require jquery_ujs
    //= require bootstrap
    //= require jquery-ui
    //= require jquery.purr
    //= require_tree .
    //= require best_in_place
    

    then instead of coffee do this at the top of the page:

    $(document).ready(function() {
      $('.best_in_place').best_in_place();
    })
    

    If that doesn’t work, remove //= require best_in_place and //= require jquery.purr then run

    rails g best_in_place:setup
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed Ryan Bates' screencast in order to get friendly_id set up (up until
Followed instructions on Railscast but can't get server to start. It states the following
I followed along with Ryan Bates' authenticating with Facebook Railscast http://media.railscasts.com/assets/episodes/videos/360-facebook-authentication.ogv in which he
I'd followed the railscast 213 (calendars) from Ryan Bates Where he makes use of
I have followed a screen cast form ryan bates railscast and every thing is
I followed Ryan Bates Omniauth Part1 railscats http://railscasts.com/episodes/235-omniauth-part-1 . I put twitter and Facebook
I have successfully followed Ryan Bates tutorial of paperclip and have it working correctly.
I've followed Ryan Bates' screencast on using jQuery Tokeninput for an auto-completing list for
Im following Ryan Bates Screen Cast #360 Facebook Authentication... When i get to to
I recently followed a tutorial about nested forms by Ryan Bates and did basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.