Flowdock
radio_button(object, method, tag_value, options = {}) public

Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked. Additional options on the input tag can be passed as a hash with options. Example (call, result). Imagine that @post.category returns "rails":

  radio_button("post", "category", "rails")
  radio_button("post", "category", "java")
    <input type="radio" id="post_category" name="post[category]" value="rails" checked="checked" />
    <input type="radio" id="post_category" name="post[category]" value="java" />
Show source
Register or log in to add new notes.