File: //usr/local/rvm/gems/default/doc/actionview-6.1.4.1/ri/ActionView/Helpers/UrlHelper/link_to_if-i.ri
U:RDoc::AnyMethod[iI"link_to_if:ETI".ActionView::Helpers::UrlHelper#link_to_if;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"NCreates a link tag of the given +name+ using a URL created by the set of ;TI"B+options+ if +condition+ is true, otherwise only the name is ;TI"Mreturned. To specialize the default behavior, you can pass a block that ;TI"Aaccepts the name or the full argument list for +link_to_if+.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading:
leveli : textI"
Examples;To:RDoc::Markup::Verbatim; [I"_<%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) %>
;TI"&# If the user isn't logged in...
;TI"-# => <a href="/sessions/new/">Login</a>
;TI"
;TI" <%=
;TI"^ link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do
;TI"f link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user })
;TI" end
;TI"%>
;TI"&# If the user isn't logged in...
;TI"-# => <a href="/sessions/new/">Login</a>
;TI" # If they are logged in...
;TI"4# => <a href="/accounts/show/3">my_username</a>;T:@format0:
@fileI"*lib/action_view/helpers/url_helper.rb;T:0@omit_headings_from_table_of_contents_below000[ I"?(condition, name, options = {}, html_options = {}, &block);T@#FI"UrlHelper;TcRDoc::NormalModule00