{"comment":{"created_at":"2011-10-24T07:35:13Z","body":"You just need to create a test database in the test_app. Run the following:\r\n\r\n    cd test_app && bundle && bundle exec rake db:migrate db:test:prepare\r\n\r\nThen you can run `bundle exec rake` form the root path to run all the specs. You should add a new block to the `best_in_place_spec.rb`:\r\n\r\n    describe \"#best_in_place_if\" do\r\n       ...\r\n    end\r\n","updated_at":"2011-10-24T07:35:13Z","url":"https://api.github.com/repos/bernat/best_in_place/issues/comments/2500526","id":2500526,"user":{"avatar_url":"https://secure.gravatar.com/avatar/2f2bf2c1e07241c0d6e0908b5c05a97c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2f2bf2c1e07241c0d6e0908b5c05a97c","url":"https://api.github.com/users/rogercampos","id":275992,"login":"rogercampos"}},"action":"created","issue":{"number":21,"created_at":"2011-07-25T05:10:14Z","pull_request":{"diff_url":"https://github.com/bernat/best_in_place/pull/21.diff","patch_url":"https://github.com/bernat/best_in_place/pull/21.patch","html_url":"https://github.com/bernat/best_in_place/pull/21"},"body":"Used, for example, with cancan authorization system:\r\n\r\n```\r\n<%=best_in_place_if can?(:edit, listing), listing, :title, :type => :input %>\r\n```\r\n\r\nIf the condition is true, it works exactly like best_in_place.  If the condition is false, it just outputs the value of the field.","comments":6,"title":"Added best_in_place_if method","updated_at":"2011-10-24T07:35:13Z","url":"https://api.github.com/repos/bernat/best_in_place/issues/21","id":1279786,"assignee":null,"milestone":null,"closed_at":"2011-10-22T16:42:44Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/4efe3b97fdc854a143c3e92c95f46571?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4efe3b97fdc854a143c3e92c95f46571","url":"https://api.github.com/users/troya2","id":165385,"login":"troya2"},"html_url":"https://github.com/bernat/best_in_place/issues/21","labels":[],"state":"closed"},"legacy":{"issue_id":1279786,"comment_id":2500526}}