rtomayko / sinatra-sequel

Sinatra extension that adds Sequel ORM features, database config, and database migrations
Other
196 stars 29 forks source link

We need more examples please. #11

Open brandon-dacrib opened 10 years ago

brandon-dacrib commented 10 years ago

Can you show us an example with a post, including the erb? Specifically I am looking for taking some from data and inputting it into a db via sinatra-sequel. I am currently doing something like this:

post '/settings/keys' do
    @keys = Keys
    Keys.insert(:key => params[:key], :value => params[:value])
    erb :settings_keys
end