search for: wnwpw

Displaying 20 results from an estimated 27 matches for "wnwpw".

Did you mean: wndw
2008 Sep 06
6
Configuring custom library
Hi, I''ve added a custom library called lib\AccountSystem like so: "module AccountSystem SINGLE = 1 MULTIPLE = 2 class << self attr_accessor :account_system_type end end" Now I wanna configure AccountSystem.account_system_type=AccountSystem::SINGLE in one app. I used an initializer: config/initializers/account_initialization.rb where I put this line in. I
2005 Nov 16
3
controller before_filter issues
Hi, Some controller filters: before_filter :require_logged_in, :only => [:create, :new, :confirm] before_filter :init_players, :only => [:create, :new, :confirm] The first one, you guessed it, redirects a user if he''s not logged in. Now when I hit this page and I''m not logged in, the 2nd filter gets executed and throws an error, because it depends on the user
2005 Nov 27
5
OT: good admin gui postgresql on OSX?
Hi, I recently bought by first Mac and I''m looking for some alternatives for my windows applications. Does anybody know a decent gui admin app for postgresql? On windows I use postgresql manager: http://www.sqlmanager.net/en/products/postgresql/manager I find this a very good piece of software and it''s free, even though I paid a little for some extra features. I''d
2005 Dec 23
6
Agile book - test error
Hi all, I get an error when testing the "store_controller_test.rb" The troublesome line is in the test below: def test_add_to_cart get :add_to_cart, :id => @version_control_book.id <<< cart = session[:cart] assert_equal @version_control_book.price, cart.total_price assert_redirected_to :action => ''display_cart'' follow_redirect
2005 Dec 23
5
Can''t get data from products into @order
I went throught the "agile web developemnt with rails" and Now I''m trying to ''enhance'' the code with some extra options. When I go to admin/shipping I want to include some data from the products table in with the order info listed. I can''t seem to get this to work. in my partial form I''m trying to add this: <td
2005 Dec 20
8
Using rails with stored procedures
Hi all! I am quite new to rails, and I would like to know if there is a tutorial, or if someone can tell me how to use rails with stored procedures and views. Any help would be appreciated. Thanks to all -- ------------------------------------------- Gioachino Bartolotta
2006 May 28
13
JSON not auto-evaluated
Hi, please consider this stripped down example: new Ajax.Request(''foo.php'', { onSuccess: function(t, json) { alert(json.myParam); } }); According to http://www.sergiopereira.com/articles/prototype.js.html, the second param is supposed to be the evaluated json object IF the X-JSON header is send in the response. I send the header in my script. However, the json var
2005 Dec 11
62
PROPOSAL: The list needs to fork (desperately).
I''d like to propsoe that the RubyOnRails mailing list forks into three lists. PROBLEM: * The list is getting swamped with traffic, making it hard to use and even harder to follow. * Many, many messages get lost, with no reply. * Due to the overwhelming traffic, it''s hard for beginners to get the help that they need, since their messages get lost in the shuffle, and
2005 Dec 16
3
Productize on 1.0
Hi, Has anybody tried using the Productize plugin on a recent Rails install? The pages on RubyForge http://rubyforge.org/projects/productize/ seem to indicate the development has sort of stalled, or perhaps it''s stable as can be. Just thought I''d ask for before I give it a go.. Cheers, Jeroen
2005 Dec 23
0
Completely off topic but ...
this newbie want''s to wish all coders around the world "Happy holidays!" Not to much keyboards and try doing something altruistic. Regards, Gerard. P.S. I know xmas is a holiday with religious backgrounds so no offence I you practice a different belief.
2005 Dec 25
1
belongs_to loop?
Hi all, I''m having two tables: contacts (belongs_to) company details. The problem is this. In the company table I have a field "pid" (parent id). Which relates a company (being a possible subsidiary) to it''s parent e.g. a bigger enterprise. Does the belongs_to work when related to the same model (table). The relation is upwards only for now. I don''t want
2005 Dec 29
4
How to handle a non existing action in a controller?
Hello, i''m currently building a website in which i have to customise the url to the data. An example: i have a company which is situated in Amsterdam and it''s name is Ruby, then i would like to have the following URL: /companies/amsterdam/ruby/ But since there are a lot of cities that have companies i can''t make a define for all of these. How to fix? Thanks in
2004 Dec 08
0
send file problem
Hi I have problem with this function: def download begin File.readable?(path) -> true File.file?(path) -> true path = "/path/hej.pdf" send_file path end Log gives me Processing ContentsController#download (for 192.168.0.6 at Tue Dec 07 23:05:17 CET 2004) Parameters: {"action"=>"download",
2005 Oct 21
0
newbie configuration question- how to define global config?
Hi, This is more a general question. How would I define global configuration options in Rails? Say I just wanted to define a location (path) where member profile pictures are stored. I''m guessing this should go inside environment.rb. But how would I define it, are there special conventions to avoid clashes with other configurations? Do I use some registry system? TIA, Jeroen
2005 Nov 07
0
pk_and_sequence_for(table) bug?
Hi, Doing connection.pk_and_sequence_for doesn''t return anything when I''m positive I''ve got a PK and sequence on my table on column "id", see DDL below. Is this a bug? ?> Player.primary_key => "id" >> Player.connection.default_sequence_name "players" => "players_id_seq" >>
2005 Nov 19
1
link_to weirdness
Hi, I''ve got a page running at say http://example.com:3000/admin/players Then I''ve this bit of code to generate a URL like: http://example.com:3000/admin/players?order_col=fname&order_dir=desc <%=link_to col[:label], :overwrite_params => { :order_col => col[:field], :order_dir => @order_dir == ''asc'' ? ''desc'' :
2005 Dec 06
1
globalize plugin question
Hi, I''d like to try and use the Globalize plugin, but I only need a subset of the features that plugin provides. I''d like to: - translate text in views - format date/time/numbers using different locales I won''t be using stuff like: Locale.set("en-US") prod = Product.find(1) prod.name -> "Meatballs" Locale.set("es-ES") prod =
2009 Apr 09
0
HTTP Digest Authentication not working
Hi to all, I''ve created a new project with Rails 2.3.2 and literally copied the HTTP Digest Authententication example from the documentation into a SecretsController: class SecretsController < ApplicationController Users = {"dhh" => "secret"} before_filter :authenticate def secret render :text => "Password Required!" end private
2005 Dec 24
2
Multi language pages (access @session from a model)
Hi, I''m creating a simple Ruby on Rails based CMS. It will support multiple languages. Therefore I''ve a table ''pages'' and a table ''page_translations''. The table ''page'' contains a title and body in the default language, the table ''page_translations'' contain a title and body for an other language. Now I
2008 Oct 21
1
How to force a lock_version increment
Hi everyone, I have a order with order_lines use case. On changing the lines, I want to be sure no one else changed the order. So I use lock_version on the order. This works fine if something is changed on the order record. But now i have the situation that I delete, alter and add order lines without changing the order record itself. I have to check and increment the order#lock_version however