Merge pull request #53 from finnlabs/feature/20043-rails-4.1

[20043] Upgrade to Rails 4.1.x
pull/6827/head
ulferts 9 years ago
commit d8c3142250
  1. 5
      lib/report/controller.rb
  2. 2
      reporting_engine.gemspec

@ -348,8 +348,9 @@ module Report::Controller
# @param query An optional query added to the disjunction qualifiying reports to be returned.
def find_optional_report(query = '1=0')
if params[:id]
@query = report_engine.find(params[:id].to_i,
conditions: ["#{is_public_sql} OR (#{user_key} = ?) OR (#{query})", current_user.id])
@query = report_engine
.where(["#{is_public_sql} OR (#{user_key} = ?) OR (#{query})", current_user.id])
.find(params[:id].to_i)
@query.deserialize if @query
end
rescue ActiveRecord::RecordNotFound

@ -16,6 +16,6 @@ Gem::Specification.new do |s|
s.files = Dir["{config, doc, lib}/**/*", "README.md"]
s.add_dependency 'rails', '~> 4.0.13'
s.add_dependency 'rails', '~> 4.1.11'
s.add_dependency "json"
end

Loading…
Cancel
Save