similar to: Dumb views?

Displaying 20 results from an estimated 2000 matches similar to: "Dumb views?"

2009 Dec 23
3
Help with Navigation
I''m currently using CSS to style my navigational menu. I also have jquery at my disposal. The basic structure is like this: <div id="nav"> <div class="inner-container"> <div id="wrap"> <div class="inner"> <h2> <span class="h-ico
2006 Apr 25
7
Rails producing the / page.
Hi all Very simple question, im sure, but I cant find docs anywhere that tell me how to do this. What I want is for the index page of the server to be generated from rails, is www.wibble.com/ will result in a page that has been processed by rails, has the templates etc. >From what I can see, the index page comes from public/index.html How do I get this to be a rails page? Thanks Jonathan
2011 Jul 06
5
Monkey patching a gem (rails_admin, with Rails 3)
Hi. I''m trying to monkey patch the rails_admin gem. First, I tried to add a file in config/initializers containing: RailsAdmin::MainController.class_eval do def get_sort_hash CODE HERE... end end It was only loaded once, and then the method from the gem was always executed instead of mine. I also tried to add the code in lib/ with the correct line in config/application.rb to load
2007 Dec 23
1
Rails: possible routing discrepancy
Hey all, I''m seeing a strange behavior in my spec that I can''t account for. I''ve got a route that looks like this: map.writing \ ''/writing'', :controller => ''abstracts'', :action => ''index'', :index => { :select => ''all'' } and I have template code that looks like this: <br
2006 Jan 29
4
current_page?()
Can someone give me a working example of current_page?(), because I''ve been trying to get this to work for a while now. I''ve been trying this: if current_page?(".*") @test = "asd" end but get a "undefined method `current_page?''" when I put it in my controller or application.rb. If I put it in my application_helper.rb, the page renders
2006 Jan 04
2
Navigation Helper
I am attempting to integrate a main navigation section into my web application. Naturally the easiest and DRY way to do this would be to either include it in a layout, or as a partial. The only problem is that I want the link for the current page to have its own css id ("current"). The only way I can think to accomplish this is to just include the navigation in every page, but this is
2007 Aug 22
1
Tabbed Navigation
Went back and forth a bit trying to find out the easiest way to do this. Found a plugin but it didn''t seem very stable/well written. This is what I have going right now: - if @content_for_recipe_editor_tabs = yield :recipe_editor_tabs - else = tabbed_navigator(RecipesController.send "edit_tabs") If any templates/sub-templates/partials used in this render have
2008 Mar 04
9
What is your workflow? Or how to use the story runner the right way.
I really would like to know how people are using the Story and Example runner to write their software.It would be great to get some direction on it, because I think I''m missing some points. Taking the outside-in approach in thought: At first we write a high-level customer-facing story, this story fails. Then we start using mocks at object level to use them as a design tool, and so we
2006 Apr 12
3
noob question
Hi *, I am writing my first app based on the ''depot'' application but with some suttle differences to help me learn. I am a bit sutck with following and would be grateful for any help: I have the following controller: class MainController < ApplicationController def index @objects = Object.certified_items end end This relates to a field called
2008 Dec 17
2
Help with link_to and its kin
Hi Everyone I am a new user of Ruby and Rails, and would like some help with the following problem. I have created a navbar with a styled unordered list and I would like to apply class="current" to the tab for the current page. Currently I am using a large, cumbersome and ugly if..then block, rendering the class="current" into the html and link_tos with current_page?. I am
2010 Sep 10
10
current_page? inside controller
Is there any easy way of using something like current_page? method from ActionView::Helpers::UrlHelper inside controller ? I have routing like: resources :addresses resources :mailing_addresses, :controller => ''addresses'' And I would like to do a check in my controller that would look like this: class AddressesController def index if current_page?(live_addresses_path)
2008 Mar 15
4
[PATCH] Get requests with non-html referers
Hey, Aaron. Looks like that get with hash params patch you checked in had some side effects. Specifically, you''re testing if a referer is a Page (mechanize.rb:171), but the referer could also be a WWW::Mechanize::File. Like if the last page loaded was xml. Here''s a patch that addresses the issue. Thanks again, Mat -------------- next part -------------- A non-text
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
2009 Mar 24
12
MonkeyPatching ActiveRecord::Base class
I am trying to monkey-patch the ActiveRecord::Base class to incorporate a generic search class method so that it can be used by all model classes which need this functionality. Since model classes directly inherit from ActiveRecord::Base and unlike controllers and helpers, do not have an ancestor class defined, I think I am forced to open the ActiveRecord::Base class and patch it? May be I am
2008 Apr 04
4
Advice on best operator phone (with attendant console)
One of our clients is using a Grandstream GXP2000 with an attendant console. We have used the same phone with past clients successfully however this particular operator processes around 200 calls a hours and the GXP2000 for sure does not like the quick line shuffling and call volume. We get the following problems randomly: 1. menu stops working 2. transfer key stops working 3. Line 1 LED gets
2009 Jan 16
2
Recommendations for consumer-grafe GPSes?
2. Recommendations? My use case is pretty typical. I have one Linux machine I want to protect, automated shutown is desirable, blackouts longer than a hour are very rare at my location (the last one I can remember was in 1993), brownouts are very rare and mild, but summer thunderstorms are common and can be severe. I'm a good match for your typical consmer-grade UPS. 2a. In 2009, what do
2006 Jul 18
8
Including files from lib/
I asked about this a few days ago and got no replies, so I''m asking again. I have a file called string_extensions.rb. In it, I extend the String class to include some extra functionality. I put this file into the lib/ directory of my app. But the changes made to String don''t take effect. The program acts as though the files aren''t being included. I''ve stopped
2005 Nov 19
3
Permissions problem I don't understand
I am try to use rsync from my windows box (under cygwin) to back up "My Documents" on to a debian server (known on my home network as roo.home) running rsyncd from inetd where it is run as root. my rsyncd.conf file sets the gid and uid to user backup.backup thusly:- syslog facility = daemon uid = backup gid = backup hosts allow = 192.168.0.0/24 hosts deny = 0.0.0.0/0 timeout = 600
2006 Apr 27
5
ERb on he command line re: Ruby For Rails book
Hi, I am working thru the Ruby for rails book. On page 30 David Black talks about running erb from the command line i.e. $ erb erbdemo.rb just as you would a normal ruby prog ($ ruby erbdemo.rb) but when I try to do this I get command not found. How do I make this work? I am running Linux (Ubuntu Breezy) Regards, Paul
2008 Jan 09
5
Parallel indexing doesn''t work?
Hi, I''m trying to get parallelized ferret indexing working for my AAF indices, based on the example in the O''Reilly Ferret shortcut. However, the resulting indices after merging seem to have no actual documents. I went and made minimal changes to the example in the Ferret shortcut pdf, and indeed can''t get that to work either. I''d appreciate any help