fix for fronted routing failed
This commit is contained in:
		
							parent
							
								
									7e9fce0c2d
								
							
						
					
					
						commit
						41168f4c99
					
				|  | @ -194,6 +194,10 @@ GEM | ||||||
|     rack (1.4.5) |     rack (1.4.5) | ||||||
|     rack-cache (1.2) |     rack-cache (1.2) | ||||||
|       rack (>= 0.4) |       rack (>= 0.4) | ||||||
|  |     rack-gridfs (0.4.1) | ||||||
|  |       mime-types | ||||||
|  |       mongo (~> 1.2) | ||||||
|  |       rack | ||||||
|     rack-oauth2 (1.0.0) |     rack-oauth2 (1.0.0) | ||||||
|       activesupport (>= 2.3) |       activesupport (>= 2.3) | ||||||
|       attr_required (>= 0.0.5) |       attr_required (>= 0.0.5) | ||||||
|  | @ -373,6 +377,7 @@ DEPENDENCIES | ||||||
|   pry-debugger |   pry-debugger | ||||||
|   pry-remote |   pry-remote | ||||||
|   pry-stack_explorer |   pry-stack_explorer | ||||||
|  |   rack-gridfs | ||||||
|   radius |   radius | ||||||
|   rails (~> 3.2.9) |   rails (~> 3.2.9) | ||||||
|   rake |   rake | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ class Item | ||||||
|   |   | ||||||
|   validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/ |   validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/ | ||||||
|   # validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } |   # validates :name, :exclusion => { :in => LIST[:forbidden_item_names] } | ||||||
|   validates_uniqueness_of :name, :scope => :parent_id |   validates_uniqueness_of :name #, :scope => :parent_id | ||||||
|   validates_presence_of :name |   validates_presence_of :name | ||||||
|   validates_associated :parent, :children |   validates_associated :parent, :children | ||||||
|    |    | ||||||
|  |  | ||||||
|  | @ -30,8 +30,8 @@ module ParserFrontEnd | ||||||
|         part = PagePart.find(front['part_id']) if front['part_id'] |         part = PagePart.find(front['part_id']) if front['part_id'] | ||||||
|         ret << eval("\"#{front['path']}\"") rescue '' |         ret << eval("\"#{front['path']}\"") rescue '' | ||||||
|          |          | ||||||
|         args.each do |arg,index| |         args.each do |index,arg| | ||||||
|           ret << (ret.include?("?") ? "&#{index}=arg": "?#{index}=arg" ) |           ret << (ret.include?("?") ? "&#{index}=#{arg}": "?#{index}=#{arg}" ) | ||||||
|         end if args |         end if args | ||||||
|         fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>") |         fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>") | ||||||
|       end |       end | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue