I added a couple of models and controllers with active scaffold. However, whenever I click any of the actions such as new, edit, search, show etc. nothing is visible in the browser. It seems that the server is responding to it as the logs show:
Started GET "/organisms/1" for 127.0.0.1 at 2013-03-15 12:55:35 -0400
Processing by OrganismsController#show as JS
Parameters: {"id"=>"1"}
Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", "1"]]
(0.4ms) SELECT COUNT(*) FROM "genes" WHERE "genes"."organism_id" = 1
Rendered /opt/local/lib/ruby1.9/gems/1.9.1/gems/active_scaffold-3.2.19/frontends/default/views/_show_columns.html.erb (2.9ms)
Rendered /opt/local/lib/ruby1.9/gems/1.9.1/gems/active_scaffold-3.2.19/frontends/default/views/_show.html.erb (15.4ms)
Completed 200 OK in 32ms (Views: 26.0ms | ActiveRecord: 0.9ms)
But nothing changes in the browser window. The Firebug 'Net' logs show a response header:
Cache-Control max-age=0, private, must-revalidate Connection close
Content-Type text/javascript; charset=utf-8
Etag "c08465bfa6a67a8fb4f88964513a6b23" Server thin 1.5.0 codename
Knife X-Request-Id 6ee347aa85988460733ffbda65ea12ee X-Runtime 0.036693
X-UA-Compatible IE=Edge
The response looks like html to me:
<h4></h4>
<dl>
<dt>Name</dt>
<dd class="name-view">
-
</dd>
<dt>Genes</dt>
<dd class="genes-view">
-
</dd>
</dl>
<p class="form-footer">
<a href="/organisms" class="as_cancel" data-remote="true">Close</a>
<img alt="loading indicator" class="loading-indicator" id="as_organisms-create-1-loading-indicator" src="/assets/active_scaffold/indicator.gif" style="visibility:hidden;" />
</p>
I suspect the problem two issues:
Is the data on the page changing? I think activescaffold
is using ajax to re-render portions of the page, so you will not see the hole page change. If there is nothing different on the screen then it will look like nothing happened.
Answer: Use git master gem 'active_scaffold', :git => 'git://github.com/activescaffold/active_scaffold.git'
see below for details