Skip to content

Commit

Permalink
Fixed extra quote problem
Browse files Browse the repository at this point in the history
  • Loading branch information
rutledgeglobal committed Oct 15, 2009
1 parent 9f45a61 commit 5a18324
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
19 changes: 18 additions & 1 deletion README
@@ -1,6 +1,8 @@
Activejquery
============

Oct 15,2009 - Fixed Keyword problems for Ruby 1.8
Fixed "/" problem breaking javascript includes with namespace

Oct 10,2009 - Start adding better assoc support
Oct 10,2009 - Updated to jquery-ui-1.7.2 and jggrid 3.5.2
June 28,2009 - Renameed localsel automatic divid to tablename_select
Expand Down Expand Up @@ -54,13 +56,28 @@ May 14 2009 - Added support for one line controller.
Environment:
=======
Designed for Ruby 1.9.1 and Rails 2.3.2
Initial testing done for Ruby 1.8.x

Formatting Notes:
================
Activejquery uses a default view to style the grid,
this is in views/activejquery/show.erb
If you have added addition default styles/views, you may see the
page number box to be squashed.


Routes
=======
You must add a active resource route in config/routes.rb

map.resources :airstate

Namespaced Controller route example

map.namespace :adminspace do |adminspace|
adminspace.resources :user
end

Example
=======

Expand Down
4 changes: 1 addition & 3 deletions lib/active_jquery.rb
Expand Up @@ -13,8 +13,6 @@ class Config
def initialize(model_id)
@model_id = model_id
@model = model_id.to_s.camelize.constantize
pp @model_id
pp @model
end

def model_name
Expand Down Expand Up @@ -46,7 +44,7 @@ def setup_ajs
if !defined? @ajs
@ajs = ActiveJqueryRuntime.new(self.class.active_jquery_config.model,self)
@content_for_layout = String.new
@content_for_layout << '<script src="' + params[:controller] + '.js" type="text/javascript"></script>' + "\n"
@content_for_layout << '<script src="/' + params[:controller] + '.js" type="text/javascript"></script>' + "\n"
@content_for_layout << @ajs.grid_html()
@heading = params[:controller].humanize()
@title = @heading
Expand Down
4 changes: 2 additions & 2 deletions lib/active_jquery_runtime.rb
Expand Up @@ -16,7 +16,7 @@ def find_associated_fields(assoc)

def initialize(table,ctlenv)
@controller = ctlenv.params[:controller]
@url = @controller
@url = "/" + @controller # To handle namespace properly
@tkey = "id"
@actions = [:create, :update, :show, :delete, :search]
@edit = FALSE
Expand Down Expand Up @@ -210,7 +210,7 @@ def grid_html()


def html_generate(divid = 'list')
@jqgrid_html << '<table id="' + divid + '""></table>' + "\n"
@jqgrid_html << '<table id="' + divid + '"></table>' + "\n"
@jqgrid_html << '<div id="' + divid + '_pager"' + '></div>' + "\n"
end

Expand Down

0 comments on commit 5a18324

Please sign in to comment.