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