Я думаю, что вы не объявили правильно свой JFrame. Вот пример создания простого кадра:
public static void main(String[] args)
{
// Creating a frame
JFrame frame = new JFrame("Example");
// Setting the position and the size of the frame
frame.setBounds(0,0,800,600);
// This will terminate the program when closing the frame
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Then you can display your frame
frame.setVisible(true);
}
Думаете, вам нужно будет проверить наличие create и new
<% if current_page?(:controller => "activities", :action => "new") or current_page?(:controller => "activities", :action => "create") %>
не очень красиво, может быть, обернуть это вспомогательным методом?
Вы также можете проверить, не заполнено ли поле created at. Поскольку он не будет установлен, пока действие не будет создано.