Button is as follows:
<%= render 'follow_form' if signed_in? %>
In follow_form:
<%= render 'follow' %>
In follow.html.erb:
<%= form_for current_user.relationships.build(:followed_id => @user.id),
:remote => true do |f| %>
<div><%= f.hidden_field :followed_id %></div>
<div class="actions"><%= f.submit "Watch" %></div>
<% end %>
How would I style that with CSS?
You can simply pass parameters to the
f.submithelper, including a class and/or ID, to enable the button to be styled by CSS. For example, you could put this in the ERB:and then have a CSS class that applies to that, for example: