Skip to content

Commit

Permalink
Minor changes to script/remote to enable changes on root node
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Jan 26, 2012
1 parent 80e75d7 commit 061d577
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions lib/zena/remote/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ def tag_names=(list)
@attributes['tag_names'] = SerializableArray.new('tag_names', 'tag', list)
end

def parent_id(v)
if v then
# Cannot have nil values here (root node special case).
@attributes['parent_id'] = v
end
end

def id
@attributes['id']
end
Expand Down
16 changes: 9 additions & 7 deletions lib/zena/use/display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,15 @@ def r_grid
expand_with
end

# Also used by rubyless_expand
def show_string(method)
if param(:h) == 'false'
"<%= #{method} %>"
else
"<%= h #{method} %>"
end
end

private
def show_number(method)
if fmt = param(:format)
Expand Down Expand Up @@ -709,13 +718,6 @@ def show_number(method)
end
end

def show_string(method)
if param(:h) == 'false'
"<%= #{method} %>"
else
"<%= h #{method} %>"
end
end

# show_time is in Dates
end
Expand Down

0 comments on commit 061d577

Please sign in to comment.