similar to: help with link_to_if, I can''t make it work...

Displaying 20 results from an estimated 200 matches similar to: "help with link_to_if, I can''t make it work..."

2005 Dec 15
6
Navigation menu
I have a navigation menu that contains a link per controller in my application. This menu is the same for all controllers, but I want this behaviour: <a>Users</a> <span>Statistics</span> and <span>Users</span> <a>Statistics</a> depending on the page you''re currently on. I''ve put a <render :partial =>
2006 Jan 05
0
Re: help with link_to_if, I can''t make it work..
Nooby guess, Do you need a comma between comment.web_site and {"class... ? Looks like there should be 4 params...test, text, href and html_params A. On 4 Jan 2006, at 04:42, rails-request@lists.rubyonrails.org wrote: > Date: Wed, 4 Jan 2006 05:05:39 +0100 > From: charlie bowman <cbowmanschool@yahoo.com> > Subject: [Rails] Re: help with link_to_if, I can''t make it
2006 Feb 11
6
models and validation problem
In my model, I am attempting to correct some bad data rather than just pass an error message back to the user. The problem is that my fix seems to get the data past validation but it then puts the bad data into the database rather than the new(and improved) data. If I pass in web_site with the value of ''www.test.com'', it will pass validation but it won''t add
2006 Jan 22
2
Rails and Apache: Error
I''ve done my development using WEBrick, and now I want to put my application on a server that uses Apache. (not with fcgi) I think I''ve done everything like I''m supposed to, but when surfing to my site I get: Application error Rails application failed to start properly" In /var/log/apache/error_log, I get this error:
2008 Mar 24
8
Proper idom for link_to_if
What I wish to do is to have a construct like this in a view: <%= link_to_if <some test>, "New Model View", new_model_path -%> <some test> has to return true if new_model_path is defined and false otherwise. What is the proper idiom to do this in rails 2? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jan 21
9
Where to put method
I''ve got following code in GenresHelper.rb def album_list(genre) albums = genre.albums.sort list = albums.collect { |album| link = link_to album.title, :controller => ''albums'', :action => ''show'',
2006 Jan 03
1
Passing parameters with link_to
I have following code in my controller: class AlbumsController < ApplicationController def list_by_year(year) @album_pages @albums = paginate :albums, { :per_page => 10, :conditions => ["year = ?", year] } render :action => ''list'' end end Now I want to make a link to the list_by_year action in
2006 Jan 04
7
variables in layouts
I have a layout that provides the basic outline of each page in my app. It has a title, footer and a navigation bar. In the title I want to put the name of the current user that is logged in. I could do something like @session[:username] but I would rather encapsulate that into a single variable so that I can change the key in the session map if I want without having to goto each page that
2006 Jan 04
7
wrong number of arguments error
I keep getting this error every time I try to pass a value to a method. Here is a sample nonworking method. I''ve been pulling my hair out over this all night! Why won''t it work!? My url path is :3000/store/browse/shoes and I''m getting this in the log Parameters: {"action"=>"browse", "id"=>"shoes",
2011 Jan 08
1
Paperclip custom Interpolation in url
Folks, I have a simple model hierarchy (reduced to example as below) class Post < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :post has_attached_file :photo, # :url => "/assets/class_cal/<original post date>/:id/:style/:basename.:extension" :url =>
2006 Jan 09
3
Scaffolding - disabling Create, Edit, Destroy for some user logins?
People, I am using: before_filter :login_required in my Controllers and this works fine. For some tables I am happy to use the output of eg: ruby script/generate scaffold Author but is there some way that I can disable Create, Edit, Destroy for some user logins in the corresponding view? Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a working solution to adding comments to one or more models in my application using acts_as_comentable. Great plugin, but my implementation is lame. I need enlightenment. I have users who log in. For several views I want to let them add comments. Enter act_as_commentable which does just this -- it''s polymorphic, so you
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys, 1. Which is the difference between this two methods? (select_datetime, datetime_select) 2. How I assign the selected date-time values, to an specific variable or array using select_datetime I know do it using datetime_select(''object'',''method'') I aprecciate your attention. Thanks PD: Sorry about my english.
2013 Jan 18
3
longitudinal study
Hello R user, I have a data set from a longitudinal study ( sample below) where subjects are followed over time. Second column (status) contains info about if subject is dead or still in the study and third column is time measured in the week. Here is what I need: if status is not dead or unknown take the last week, if status is dead or unknown I need to have corresponding week. Desired resulst:
2005 Jan 20
2
Excel files & file modification time
Hi everyone, I have a problem on samba running on RHEL 3 kernel 2.4.21 with RHEL 3 samba packages - samba-3.0.7-1.3E.1. The problem is, that when people open excel files (with office 97 version of excel) the file modification time is changed (even if the file is only opened and excel closed without saving). This same problem does not occur on the [homes] share (in every test untill now it never
2007 Jun 19
1
Display Options While Paginating
I have a table full of articles that I want to paginate. Easy enough with: [Controller] @article_pages, @articles = paginate(:articles, :per_page => 20, :order => ''post_date DESC, title ASC'') BUT, there are different types of articles: regular news articles (designated NA), and press releases (designated PR). If I want to put each type in a different table on the same
2011 Apr 13
5
Nested route with collection
Hi! I try to do nested route with collection, but I always have mistake route: resources :user do resources :todo do member do post :complete end collection do get :completed end resources :post end end View: <%= link_to_if (params[:action] == ''home''), ''Done'', comoleted_user_todo_path %> Browser back me mistake undefined local
2005 Mar 30
2
Production Log Analyzer 1.1.0
First public release of Production Log Analyzer! Download it at: http://rubyforge.org/frs/?group_id=586 The Production Analyzer lets you find out which pages on your site are dragging you down. pl_analyze requires the use of SyslogLogger (included) because the default Logger doesn''t give any way to associate lines logged to a request. SyslogLogger gives you many other
2007 Dec 12
2
discrepancy between periodogram implementations ? per and spec.pgram
hello, I have been using the per function in package longmemo to obtain a simple raw periodogram. I am considering to switch to the function spec.pgram since I want to be able to do tapering. To compare both I used spec.pgram with the options as suggested in the documentation of per {longmemo} to make them correspond. Now I have found on a variety of examples that there is a shift between
2006 Feb 05
6
render partial -- show certain content only if...
i''m working on a _post.rhtml partial, and it displays one blog post. i''m accessing this partial on the list.rhtml and the show.rhtml what i''d like is to only show the "link" link on the list.rhtml and not on the show page. <%= post.title%> <br /> <%= post.body%> <%= link_to