Permalink
Browse files

fix new article action

  • Loading branch information...
1 parent 9b8388a commit e94fb34fb870b22e8a405594178030bbf59e56b3 @yuszuv committed Sep 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.rb
View
2 app.rb
@@ -70,7 +70,7 @@ def articles
get '/admin/pressespiegel' do
@articles = articles
- @edit_article = OpenStruct.new(riak.bucket('schulze').get(params[:key]).data.merge(key: params[:key]))
+ @edit_article = OpenStruct.new(riak.bucket('schulze').get(params[:key]).data.merge(key: (params[:key].present? ? params[:key] : Time.now.to_i)))
haml :admin_pressespiegel
end

0 comments on commit e94fb34

Please sign in to comment.