Use the application controller method to handle the viewport stuff.
Cleanup spaces.
No need to write the query in the controller, active record will do this for you.
Nobody passed a flat list of variables like that... instead build a hash of values you want to update, then update them with the available code.
Never, never, never, never, never override .create on an AR model. Style aside, it will most likely break functionality with other libraries.
Just wanted to show another way to load "tables" of data in Ruby.  I kept the existing table, just mapped it to a struct and then used AR's existing create method to create the agendas.
This might look like a breaking change, but it's less of a breaking change than overriding create on an AR model. :)