fix SQL syntax
Merge pull request #13 from alepore/patch-1

fix SQL syntax
remove dependency on debugger gem

that it's obsolete and doesn't work with latest ruby
simplify migrations installation

this is the normal rails engine behaviour
Merge branch 'alepore-migrations'
Change debugger to byebug.
	modified:   surveyor_gui.gemspec
include only required assets

also add a blank layout for controllers that open inside the lightbox. this allow to not use the application layout which is application wide and will be probably modified.
Add jquery-ui-rails to surveyor_gui_all.
	modified:   lib/generators/surveyor_gui/templates/app/assets/javascripts/surveyor_gui_all.js
Added jquery-rails and jquery-ui-rails assets to manifest.  Removed surveyor.

Removed surveyor-all from surveyor_gui_all manifests.  Left references to
datetimepicker and selectUISlider js assets.
	modified:   lib/generators/surveyor_gui/templates/app/assets/javascripts/surveyor_gui_all.js
	modified:   lib/generators/surveyor_gui/templates/app/assets/stylesheets/surveyor_gui_all.css.sass
Changes dependency editor to show title of group rather than question when group present.
	modified:   app/controllers/dependencys_controller.rb
Ensure that the dependency editor renders the question pulldown correctly for groups.

When adding dependencies to a group question, the dependency editor was (correctly)
excluding the first question in the group from the question dropdown, but was
(incorrectly) showing the subsequent questions that belonged to the group.

The group needs to be treated as a single question, and this change ensures
no questions in a group are shown in the question dropdown when adding dependencies
to that group.
	modified:   app/controllers/dependencys_controller.rb
Properly label a dependent group question on surveyform

Dependent question_groups have a direct association with
dependencies.  Methods to display the dependencies should
use the question_group has dependency relationship rather than
question has dependency relationship.  Modify surveyform accordingly.
	modified:   app/helpers/surveyform_helper.rb - pass a model object
	rather than builder object to list_dependencies.

	modified:   app/views/surveyforms/_question_group.html.erb - pass
	question rather than builder to list_dependencies.

	modified:   app/views/surveyforms/_question_wrapper.html.erb - pass
	question_group rather than builder to list_dependencies.

	modified:   lib/surveyor_gui/models/question_group_methods.rb -
	add controlling_questions method.
Move dependency fields in dependency_editor to a new partial.

In preparation for distinguishing between question_group dependencies
and question dependencies.
	new file:   app/views/dependencys/_dependency.html.erb
	modified:   app/views/dependencys/_form.html.erb
Get question_group based dependencies to behave correctly in Surveyor.

	modified:   app/controllers/dependencys_controller.rb - modified
	to use an instance variable @question_or_group that will take the value
	of either the question with the dependency or the question group with the dependency.
	This makes it possible to create or edit dependencies using nested attributes on
	either question or question_group.  Note that Dependency will requires a value for
	either question_id or question_group_id but not both, so building dependencies against
	the correct parent (Question or QuestionGroup) is necessary.

	modified:   app/models/permitted_params_decorator.rb - add dependency_attributes to
	whitelist for question_group, accounting for the has_one Dependency and corresponding
	nested_attributes.

	modified:   app/views/dependencys/_column.html.erb - modify partial so that it no longer
	has a direct reference to @question or @question_group.  Instead, looks at it's parent, Dependency
	to determine how to build collection.

	modified:   app/views/dependencys/_dependency.html.erb - modify to get correct nesting for
	dependencies built against both Question and QuestionGroup.

	modified:   app/views/dependencys/_dependency_condition_fields.html.erb - modify partial to work
	against both parents of Question and QuestionGroup.

	modified:   app/views/dependencys/_form.html.erb - Determine whether @question is part of a group,
	and, if so, build the dependency against a QuestionGroup instead of Question.

	modified:   lib/assets/javascripts/surveyor_gui/surveyor_gui.js - make event handling for dependencies
	less brittle by using a pattern match for ids (i.e. [id*=<...>]) instead of a starts with (i.e. [id^=<...>])

	new file:   lib/surveyor_gui/models/question_and_group_shared_methods.rb - pull out the controlling_question
	method from question_methods so that it can be used for both Question and QuestionGroup.  Also, modify
	it so that it picks up the last question when the dependency is against a group.  This is needed to get the
	question numbering right.

	modified:   lib/surveyor_gui/models/question_group_methods.rb - include QuestionAndGroupSharedMethods.

	modified:   lib/surveyor_gui/models/question_methods.rb - include QuestionAndGroupSharedMethods.

	modified:   surveyor_gui.gemspec - ditch the debugger.  Uncomment it in testbed when necessary.
sync with upstream repo