similar to: I sit possible to write it in one line ? Array init + Array loading

Displaying 20 results from an estimated 5000 matches similar to: "I sit possible to write it in one line ? Array init + Array loading"

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
2010 Oct 06
16
Dealing with an EAV database
I''ve inherited an EAV database and there''s really no option to remodel it. Data is stored as key_name, key_value pairs Trying to return a meaningful, unified recordset is far too complex to be efficient. I''ve decided to make use of the MySQL GROUP_CONCAT, and CONCAT_WS functions to return a fast query result, with the consolidated fields as one string. The final data is
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
2010 Oct 19
33
Render partial generate unwanted spaces
Hello, I have a problem with the render :partial method in all my rails webapplications. I noticed that using render :partial will generate spaces (mainly top spaces) on the elements inserted. As all my websites are seperated by module (basicaly header, content, menu, footer) it''s quite a problem as I have to set negative margin- top to various parts for the site to display as expected
2011 Mar 02
4
migrations in rails?
Are migrations used only when you''re making changes to a database? Does it just allow the developer to avoid using raw SQL when working with databases? -- 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
2010 Jul 06
28
Is this book dated?
http://apress.com/book/view/9781590597811 I acquired this book and it has the info I thought I wanted; but, I''m not sure. Is there something better more current out there? RESTful oath openid etc.. I''m coming from a wordpress to cake, codeigniter tinkering and forget why I tried rails; but, it seems pretty cool and intuitive. Appreciate the Capistrano rec prior. Super good,
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 Nov 30
2
Did I miss a meeting?!
I''ve just stumbled (literally, while I was trying to fix a glitch I was having after upgrading Aegis...) on the Inherited Resources gem... why did no-one tell me?! ;-) Is everyone else using some form of controller base-class? Am I the last on this bus! https://github.com/josevalim/inherited_resources -- You received this message because you are subscribed to the Google Groups
2010 Feb 10
16
nil object - can anyone help?
Hi there, I''ve been looking for a while now and can''t seem to find where I''m going wrong.. I''m following a railscast tutorial to send invites out to people. there''s n invitation.rb page: class Invitation < ActiveRecord::Base #attr_accessible :sender_id, :recipient_email, :token, :sent_at belongs_to :sender, :class_name =>
2010 Mar 04
25
how to share variables in data migrations (up/down)
hi there, How do we share variables in a given data migration? For example, the code below fails to work because "statuses" don''t seem to be in scope for both up and down. class AddDefaultValuesToStatuses < ActiveRecord::Migration statuses = [ { ''details'' => ''details'', }, {
2010 Dec 06
15
Windows new installation - Always problems
I would like to know if there is a way to ''package'' an application with all the associated gems and ship it to a new server and having it to "just work" in a Windows environment. Although I have never done it I know that Rails can be frozen into the application. I am wondering if I can do the same thing with other gems. I have found this
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2010 Jan 25
3
Dynamic attributes!
I want to create a general model ''Product'' that I will be able to store several attributes in it. For example the attributes :id :name :description are pretty stantard. So each product will have this attributes. However, I wanted to know if it is possible to create dynamic attributes. In the case of a cell phone device I might want to store the IMEI of the phone, this
2009 Jun 22
5
has_many through , or habtm , using form
i think there ara two ways of relate products and categories , basically i want to fix one product(e.g hp dv7....) to some categories (notebook,17"notebooks...) i made a table named categorization(incuding category_id,product_id fields) then in models i write these codes below class Product < ActiveRecord::Base has_many :categories, :through => :categorizations
2009 Oct 27
14
Authlogic Password confirmation is too short Error. NEED HELP.
Hi: I am using authlogic, and following railscast tutorial. I am running into this error code with the password confirmation. authlogic password confirmation is too short Has anyone experienced this error? I need your help. Thanks in advance for your help.
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or acts_as_tree or acts_as_nested_set. I am unable to decide among these. please could some one recommend from their experience? -- Posted via http://www.ruby-forum.com/.
2010 Aug 30
16
<b> tag in HTML 5 (was Re: Re: assert_select for <p><b>text</b>value</p>)
On 30 August 2010 15:47, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > Colin Law wrote: >> I have the following html >> <p><b>text</b>value</p> >> I can use >> assert_select "p>b", "text" >> to check the text portion, and >> assert_select "p", "value"
2009 Aug 13
10
default value if textfield is empty
Hey all, im not sure where to set a default value if a textfield is empty? For now i do it in the controller, and check if the submitted parameter is blank. But this seems not to be the best solution... Thanks for your help! -- Posted via http://www.ruby-forum.com/.
2010 Dec 23
36
Weird issue with converting floats to integer
Any idea why this calculates the integer the way it does? irb> ("291.15".to_f * 100.0).to_i => 29114 Thanks, Tom -- 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
2009 Oct 20
10
REXML
Hi, How to embed ruby code in xml . here is my XML template : string = <<EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ozxmlscene> <ozml version="4.0"> <styleRun style="1091379" offset="0" length="7"/> <text>The End</text> <object value="84"/> <object