Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Renaming user_data#name method to avoid potential conflicts with ques…
Browse files Browse the repository at this point in the history
…tions called 'name'
  • Loading branch information
Mark Kendall committed Jun 30, 2010
1 parent 000d5f6 commit 56d53b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/census/user_data.rb
Expand Up @@ -17,7 +17,7 @@ def reload
end
end

def name
def group_name
@data_group.name if @data_group
end

Expand Down Expand Up @@ -47,7 +47,7 @@ def each_pair

def keys
if @data_groups
@data_groups.map(&:name)
@data_groups.map(&:group_name)
else
@questions.map(&:prompt)
end
Expand All @@ -58,7 +58,7 @@ def keys


def find_data_group(name)
@data_groups.select {|group| group.name == name}.first
@data_groups.select {|group| group.group_name == name}.first
end

def find_question(prompt)
Expand Down

0 comments on commit 56d53b8

Please sign in to comment.