Displaying 8 results from an estimated 8 matches for "link_to_unless".
2005 Dec 26
3
Display Login Status
I''m using salted login generator and would like my pages to display a
login status bar.
If the user is logged in I want it to show something like:
---------------------------------------------------------------
You are currently logged in as UserX (Logout)
---------------------------------------------------------------
And if they''re not logged in:
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if
the user has no access right)
this is my code, it work the first time I run the application, the second
time I refresh the page I always get "stack level too deep error"
module UsersHelper
include ActionView::Helpers::UrlHelper
alias_method :link_to_original, :link_to
def permission?
true
2006 Jun 02
3
Custom Pagination Links
...<div class="pager">
<%= link_to(''< Prev'', {:params => params.merge(''page'' =>
@my_pages.current.previous)}, {:class => "prevlink"}) if
@my_pages.current.previous %>
<% for page in @my_pages -%>
<%= link_to_unless(params[:page].to_i == page.number, page.number,
{:params => params.merge(''page'' => page)},
{:class => "pagelink"}) {|link_name|
"<span class=\"currentpage\">#{link_name}</span>"} %>
<% end %>...
2006 May 25
13
.NET developer trying to understand some Rails basics
Hi All,
I''ve been a ASP.NET developer for the last few years and consider it to
be a pretty productive environment to work with. However, the
object-relational mapping (ActiveRecord) and simplicity of the Rails
framework and Ruby in general really appeals to me. .NET currently
doesn''t have something like Rails'' ORM - atleast not out-of-the-box.
Here''s my
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
..._section, :anchor => @anchor},
+ :id=>"help-link", :popup => true, :title => "Help" %>
+ </div>
+ <div id="nav">
+ <ul class="toolbar">
+ <li>
+ <%=
+ link_to_unless(controller.controller_name == 'dashboard', "Dashboard", { :controller => 'cloud/dashboard' }) do |name|
+ link_to(name, { :controller => 'cloud/dashboard'}, :class => 'current')
+ end
+ %>
+ &l...
2009 May 27
1
[PATCH server] UI tweaks for cloud
...t; "Help" %>
</div>
- <div id="nav">
- <ul class="toolbar">
+ </div>
+ <div id="navcontainer">
+ <ul class="navlist">
<li>
<%=
link_to_unless(controller.controller_name == 'dashboard', "Dashboard", { :controller => 'cloud/dashboard' }) do |name|
@@ -47,9 +50,9 @@
</li>-->
</ul>
</div>
- </div>
<div id="content">
<%= yield...
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
2006 Mar 06
20
How painful is the 1.0 -> 1.1 upgrade going to be?
Does anyone have a sense for how painful the 1.0 -> 1.1 upgrade is
going to be for existing apps? I''m finishing up my first real RoR
application with Rails 1.0. I can live with it staying at that level,
but I really want to use the has_many :through attribute to clean up
some of my code.
I''m not particularly interested in edge Rails, mainly because the
documentation for