search for: soueidan

Displaying 20 results from an estimated 26 matches for "soueidan".

2007 Nov 01
3
autotest debugger?
Hi, I keep facing problems with autotest, and I don''t know what''s happening in the background, is there anyway to know what''s happening while testing? Example: @user = User.new @user.email = "testcom" @user.errors.on(:email).should_not be_empty ...throws error failure - You have a nil object when you didn''t expect it! - You might have expected an
2010 Sep 09
17
formtastic issue
Hello, I will try to explain it step by step :-) I just created a new rails 3 app, then I created a new controller... rails generate controller admin::users I didn''t forget to add the resources in the routes.rb file like this. namespace :admin do resources :users end Now I try to use formtastic to create the form but I get erorr that my users_path doesn''t exist?
2007 Oct 02
3
Note on Rails 2.0 Preview
Make sure you get a relatively current version of rspec or you will get: /Users/me/rails/ubb/vendor/rails/activerecord/lib/../../activesupport/ lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper (NameError) Hope this helps someone.
2007 May 06
2
render :action "call method first?"
Hi, I know when I call: render :controller => ''some'', :action => ''thing'' It doesn''t call the method ''thing'' before render the template ''thing.rhtml'', but I need some instance variable which are in the ''thing'' method, how can I let it call the method ''thing'' and then render
2007 Nov 25
4
is notify resevered word?
Hi, When I added this association... class User < ActiveRecord::Base has_one :notify end ...and tried then to update column in User table it will call queries for notify table automatic? Output --------------------------------------------------------------- User Columns (0.041488) SHOW FIELDS FROM `users` User Load (0.001544) SELECT * FROM `users` WHERE (`users`.`nickname` =
2007 Apr 12
4
Installing rspec in Windows
Hi all, I''m trying to install rspec and I''m having a problem. C:\Users\Nathan\Documents\rails\myproject> gem install rspec Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rspec-0.8.2 Installing ri documentation for rspec-0.8.2... Installing RDoc documentation for rspec-0.8.2... C:\Users\Nathan\Documents\rails\myproject> ruby
2007 Mar 29
4
validates_length_of not working with :if ?
Hello, I''m trying to cut down the errors if the guy already getting the empty nickname, so he doesn''t get anything about the nickname is short. validates_presence_of :nickname This below is not working ? validates_length_of :nickname, :within => 4..40, :if => Proc.new { |user| user.nickname.length > 1 } nor this one below? validates_length_of :nickname, :within
2007 Sep 07
5
enforce mutual exclusivity
Hi, First post, please be gentle! I couldn''t find any mention of this already I''m using ActiveRecord and I want to enforce mutual exclusivity on a has_and_belongs_to_many. A concrete example: I have a User which can have one or more Roles (student, tutor, headmaster, administrator etc). However if a user is a student they cannot hold any other role. I was hoping to find
2007 Mar 27
6
how does rails do this "find_by_?"
Hello there, I''m wondering how do they create functions on the fly? find_by_any_column_name ?? I want to do something similar with my models, but I don''t really know how to do it? user_current_nickname user_current_id user_current_role etc.? Regards, Jamal -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2007 Oct 29
2
rspec throws exception (nameError)
Hi, I''m running Rails 1.2.5 with rspec 1.0.8. When i runned autotest first time, it complained about this line. #include ActionView::Helpers::JavaScriptMacrosHelper in vendor/plugins/rspec_on_rails/lib/spec/rails/dls/behaviour/helper.rb ...I commented it out, then I got another error about this line, so I also commented this out. #Test::Unit.run = true in
2007 Mar 01
1
RoR: Torrent Tracker
Hello their, I managed to find torrent tracker made in RoR language, now I downloaded and trying to run it, but I get error saying: Could not find RubyGem bencode (>= 0.0.0) I don''t know where i can get the bencode, anyone can help please :) require_gem ''bencode'' regards, Jamal -- Posted via http://www.ruby-forum.com/.
2007 Aug 21
2
validates_acceptance_of (and hidden input)
Hi Why does a failed "validates_acceptance_of" create a hidden input in the view? cheers, jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2007 Oct 08
2
flash messages?
Hello, I''m using flash[:hash] in my application, and I feel like I''m forced to make a redirect just to be sure that flash[:hash] doesn''t appear in any other views? flash[:notice] = "ASDDD" redirect_to :action => :another_method_name else flash[:error] = "DSADS" redirect_to :action => :same_method_name How do you solve this problem, to be
2008 Nov 11
1
Admin controller
This is very weird behavior for rails. 1. When I visit my app http://localhost:3000/admin/base/login class Admin::BaseController < ApplicationController def login render :text => "running" end end 2. but when I go here http://localhost:3000/ I get error because login.html.erb not found 3. even though my route looks like this. map.root :controller =>
2007 Apr 29
2
Validate unique within date range?
I''m setting up a simple system for listing products and specials. I''m looking for a way to validate that only one special can exist per product per date range. For example, if a product is on sale from 2007-04-29 to 2007-05-10, you cannot create a special for that product that starts on 2007-05-09. What''s the best way to do this with Rails? I''m fairly new to
2007 Oct 13
5
default date for date_select
Hi, How can I set a default date for a date_select? I''m trying to do something along the lines of: <%= date_select("requirement", "target_date", :end_year => 2020, :discard_day => true, :include_blank => true, :order => [:month, :year], :default => {:month => 10, :year => 2012 }) %> but the default that comes up on the form is blank month
2007 Sep 05
8
Hi..Guys new plugin again
Hi.. Guys new plugin again Foreign Key Associations is a plugin that automatically creates associations based on foreign-keys. The associations are created at runtime-ie. as your ActiveRecord models are loaded-so they will always be up-to-date. For example, given a foreign-key from a customer_id column in an orders table to an id column in a customers table, the plugin creates:
2007 Apr 06
4
using Ruby as a front end for a trading system
Hi All, needed some direction for a newbie to RoR. I have done work in Java, .net and perl, and really prefer perl and java over .net, now we are we are looking to start building a financial trading application, most of the team wants to go with .net while I am trying to build the case with Ruby. Some of our classes have been developed in delphi7. Would I be able to use RoR on the front end of
2007 Oct 30
1
flash should be empty (typeError)?
Hi, I''m trying to test wether flash.now[:okay] is not empty, but I always get the following error. TypeError in ''UserController'' can''t convert String into Integer Can''t I test the flash if they are not emtpy? Thanks for help :D //Jamal -- Posted via http://www.ruby-forum.com/.
2007 May 04
0
Text_field helper? left, center, right, fonts etc.?
Hello there, Is there any plugin for text field to modified it, like put the text in the text field to the center? make some text bold etc.? Regards, Jamal -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send