Browse Source

fix cancels

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
b0ae02fb3d
  1. 4
      app/controllers/application_controller.rb
  2. 22
      app/views/active_scaffold_overrides/list.html.erb

4
app/controllers/application_controller.rb

@ -27,10 +27,12 @@ class ApplicationController < ActionController::Base
def client_remote_ip def client_remote_ip
@client_remote_ip ||= request.env["HTTP_X_FORWARDED_FOR"] @client_remote_ip ||= request.env["HTTP_X_FORWARDED_FOR"]
end end
helper_method :client_remote_ip
def current_ability def current_ability
@current_ability ||= ::Ability.new(:user => current_user) @current_ability ||= ::Ability.new(:user => current_user)
end end
helper_method :client_remote_ip
helper_method :respond_to
end end

22
app/views/active_scaffold_overrides/list.html.erb

@ -1,7 +1,17 @@
<div class="block"> <% respond_to do |format| %>
<div class="content">
<div class="inner" data-pjax-container="true"> <% format.html do %>
<%= render :super %> <div class="block">
<div class="content">
<div class="inner">
<%= render :super %>
</div>
</div>
</div> </div>
</div> <% end %>
</div>
<% format.js do %>
<%= render :super %>
<% end %>
<% end %>

Loading…
Cancel
Save