Topic: Parameters - How to access

In my line_items controller I need to access the license_id from the parameters.  The error page shows my parameters.

 "commit"=>"License This Pet" }

How would I reference the "license_id" from the @next_line_item hash such that

license = License.find(params[:@next_line_item['license_id']])

works correctly?

Re: Parameters - How to access

Normally, params is a Hash, so you can access a value by the corresponding key.
What is strange, it's that you have an instance variable as a key in your params hash.
The error that you are trying to use it as a symbol to get a value;

license = License.find(params[:@next_line_item['license_id']])

Like that it will probably never work. Anyway I've never seen the use like that. Check how you create your page/view to generate 'params' hash correctly.
Post the full params hash, it's truncated, you can see it in your log file or in the console.
In case of nested hashes, I think you should try to get your value like that:

params[:your_object].each do |key, value|
    #do your stuff here

But in general, you don't have to do that if you have an AR object passes in your params.