Merge pull request #113 from petergoldstein/feature/make_associative_create_hash_protected

Make associative_create_statement protected rather than private
This commit is contained in:
Antonio C Nalesso Moreira 2013-09-22 18:47:57 -07:00
commit ccc7ac7a0b
1 changed files with 15 additions and 13 deletions

View File

@ -38,6 +38,21 @@ module ImpressionistController
end end
end end
protected
# creates a statment hash that contains default values for creating an impression via an AR relation.
def associative_create_statement(query_params={})
query_params.reverse_merge!(
:controller_name => controller_name,
:action_name => action_name,
:user_id => user_id,
:request_hash => @impressionist_hash,
:session_hash => session_hash,
:ip_address => request.remote_ip,
:referrer => request.referer
)
end
private private
def bypass def bypass
@ -62,19 +77,6 @@ module ImpressionistController
end end
end end
# creates a statment hash that contains default values for creating an impression via an AR relation.
def associative_create_statement(query_params={})
query_params.reverse_merge!(
:controller_name => controller_name,
:action_name => action_name,
:user_id => user_id,
:request_hash => @impressionist_hash,
:session_hash => session_hash,
:ip_address => request.remote_ip,
:referrer => request.referer
)
end
# creates a statment hash that contains default values for creating an impression. # creates a statment hash that contains default values for creating an impression.
def direct_create_statement(query_params={}) def direct_create_statement(query_params={})
query_params.reverse_merge!( query_params.reverse_merge!(