search for: pavl

Displaying 20 results from an estimated 60 matches for "pavl".

Did you mean: pavel
2010 Apr 21
4
Accessing the router from a helper
I find manually accessing the router to be quite ugly below. Is there a more direct way to access it? module ApplicationHelper def menu_item text, url = nil routes = ActionController::Routing::Routes url = if url if url.is_a? String url else routes.generate url end else routes.generate :controller
2012 Aug 04
4
Rspec
Hi all i''m trying to learn Rspec testing can anyone suggest me the best book to learn Rspec with good sample code. Thanks in advance -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group,
2010 Nov 20
3
Global text search (and replace) on MacVim?
Been trying out Macvim and I think I have covered most of what I used in other editors except for how to handle global searches and replaces for text in files (i.e. not looking for file names, but search and replace text within all files below a specific directory). Can anyone who uses MacVim tell me what they use for such tasks? I have been poking around and see :grep as the main method, although
2010 May 21
8
Designing An Application (UML, Class Diagrams)
Hi Is there any freeware anybody would recommend for showing database models and how they relate to each other? I''m picking up an app another developer left in a mess and I''m trying to sort it out. Diagrams would be a great help. Suggestions? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2012 Feb 28
8
getting error:undefined method 'current'
hi all, i am getting an error ''undefined method ''current'' for 852:Fixnum'', the error coming for following line <%if @expert_pagination.current.previous%> <a href="#" class="darkgray1"
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to
2011 Feb 23
7
rails & sqlserver collation problems
Boa tarde pessoal. Estou utilizando o intant rails com ruby v.1.8.6 e rails 2.0.2 com um servidor sqlserver2000, minha base de dados usa o collation SQL_latin1_general_CP1_CI_AS, quando tragos strings com acentuação e cedilha não consigo visualizar os carateres corretos, sei que para exibir corretamente o texto no ruby tenho que usar UTF-8. Como posso fazer pra mudar o collation da minha base ou
2010 Dec 25
7
I sit possible to write it in one line ? Array init + Array loading
I am always writing it in 2 lines : ( Array init then loading the array ) @providers = [] @authentications.map {|authentification| @providers << authentification.provider } Is there any Ruby writing for writing just one line ? thanks fyh -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2011 Jun 19
10
validates_numercality_of with allow_nil.
In the model I have: validates :square_meters_public_land, :barrier_meters, :numericality => { :greater_than_or_equal_to => 0 }, :allow_nil => true but if, in the field, on create, I don''t insert a value I have the error "field is not a number". -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2010 Feb 23
11
Couldn't find without an ID
Hello all. I''m new to RoR. I am having trouble trying to get a simple edit/update going. Everytime I hit submit, I get the following error: +++++++++++++++++++++ Couldn''t find Content without an ID Request Parameters: {"format"=>"#<content:0x4d3daac>", "commit"=>"Update", "_method"=>"put",
2010 Sep 12
11
Rails Commenting, Plugins?
Hello, I''m looking to add comments to records in my app like Books. So a user can view a Book and then comment on it... As a newbie, is this something that I should build from scratch, or are there any popular Commenting Plug-ins, (Ajax implemented) that might be worth utilizing? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Dec 30
6
validates_inclusion_of doesn't match constant
Hello, I have a model Model: SPECIAL_FEATURES = %w(none top) class Model validates_inclusion_of :special_feature, :in => Model::SPECIAL_FEATURES, :on => :create, :message => "special_feature %s is not defined" belongs_to :team def special_feature attributes = attributes_before_type_cast if attributes["special_feature"]
2011 Apr 06
16
Unable to install Rails using Gem
I am new to Ruby on Rails. I was trying to get Ruby on Rails installed. I am on Windows XP with access to internet through a proxy. I installed Ruby and then Gem. I downloaded both as standalone packages and unzipped them. But when i tried installing Rails through Gem , I got the below error " C:\Program Files\rubygems-1.7.2>gem install rails --version 3.0.1 ERROR: While executing gem
2012 May 21
4
Rails developer required.
If you are experienced rails developer please let me know. -- 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 email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2011 May 27
4
undefined method `model_name' for NilClass:Class in a form_for
Hi! I know that there are other topics about this issue, I read them and I''m always blocked. Here is the error message: undefined method `model_name'' for NilClass:Class Extracted source (around line #30): 27: 28: <h2>Add Translation</h2> 29: 30: <%= form_for @new_trad do |f| %> 31: Locale: <%= f.text_field :locale %> 32: Key : <%=
2010 Jun 28
4
Downtime notifier
What methods do people use to notify users of upcoming downtime in an application, and for handling requests nicely while scheduled downtime is occurring? My Google-fu is not yielding me anything useful-looking. -- 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
2010 Oct 31
9
self.where('section = ?', '%:search_item%')
I am trying to do a search where I can enter a part of a word and the search find all occurrences of that part word in the field. The above subject does not work. Can anyone help I am using Rails 3 and ruby 1.9.2 I use to be able to do it in rails 2.x. In my Model I have the following:- def self.search(search_item) if search_item self.where(''section = ?'',
2010 Mar 18
5
One-time script to update 1000s of values in a single column in a table: nil error?
Hi, I have a model called Stock with a value called "strength." I wrote a simple method in the Stock.rb model file to update the value of "strength" for each record in the stocks table. I created a controller called fix_controller.rb. I don''t have access to the live system, so the idea is that an admin will go to http://url/fix and a script will run to check and
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello, I have the following: <% @projects.each do |project| %> <tr> . <td><%= link_to ''Destroy'', project, :confirm => ''Are you sure?'', :method => :delete %></td> . </tr> <% end %> How can I safely comment out the TD line above? Do I have to use the =begin way? -- You received this message because you
2011 Dec 23
6
http session nil
hi all, i am new in ruby on rails,i have one issue regarding the session in ruby on rails.I am using session , i have following condition in my rhtml <%if @session[''user''].first_name == "admin"%> <table width="290" border="0" height="20" align="right" cellspacing="0"