<%= f.submit, :class => "blue button" %>
and
<%= f.submit, class: "blue button" %>
First off, both of the above are valid syntax and both work. The first is old hash syntax, and the second is new hash syntax added to ruby 1.9.
:old_hash_syntax => "something... "
new_syntax_key: "something"
So, there are no problems with the syntax for:
<%= f.submit, :class => "create_post" %>
So the syntax error that occurs is not from the line above. The problematic syntax precedes that line, probably somewhere else within that form. Hard to find, without seeing the form lines preceding f.submit
Next, I'm not sure what you were trying to do with the td tags, but most likely it is wrong, remove them. The tag is used to define a cell in table. td is for table data. Hopefully, you don't actually have a table and the td tag was just mistakenly thrown in. In that case, just get rid of the td tags, they are for table data only. If you do have a form within a table, you should probably rethink whether the table is necessary and what utility it provides. Tables aren't used for styling forms, and I can't think of any sensible reasons to put a form in a table.
If all you want is to style the button, then no need to put the f.submit in div tags or html tags outside of the erb tags. Simply specify the css class within the f.submit tags. The corresponding css styling will be applied to the f.submit. So use,
<%= f.submit, :class => "custom_button" %>
or:
<%= f.submit, class: "custom_button" %>
Either syntax is fine. The styling is in the css, .custom_button { style properties }. So, what you need to do is find the source of the syntax error preceding your f.submit tags and remove it. Next, specify an appropriate class within your f.submit tags. Boom your all set, the css will be applied.