-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #7
base: master
Are you sure you want to change the base?
Develop #7
Conversation
# so we can compose a larger query of something like: | ||
# title ILIKE ? OR title ILIKE ? | ||
query_chunks = model_attributes.map{|attr| | ||
Array.new(search_terms.count){ "#{attr.to_s} #{operator} ?" }.join(' OR ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant use of Object#to_s
in interpolation.
Space missing to the left of {.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
|
||
# Set up DB | ||
DataMapper.setup(:default, ENV["DATABASE_URL"] || "#{ENV["DB_ADAPTER"]}://#{ENV["DB_HOSTNAME"]}/#{ENV["DB_NAME"]}") | ||
DataMapper.setup(:default, ENV['DATABASE_URL'] || 'postgres://localhost/agora') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [81/80]
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
console.log('Welcome to the api demo!') | ||
|
||
function friendlyDate (datestring) { | ||
var d = new Date(datestring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
get "/search" do | ||
|
||
# search for terms in description and title | ||
search_results = Event.full_text_search(params[:q], [:description, :title]).sort_by(&:start_date).reverse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [111/80]
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line detected.
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line detected.
No description provided.