[Rails] params in nested resources

2013-04-20 Thread Remco Swoany
Hi, Already 2 ful days of trial and error...grgr. Can someone help me... part of my tag model: class Tag ActiveRecord::Base has_many :taggings has_many :houses, through: :taggings end part of my house model class House ActiveRecord::Base has_many :taggings has_many :tags,

[Rails] Association - strange formatting

2011-11-21 Thread Remco Swoany
Hi, i have a simple association: Appartment: has_many :leads Lead: Belongs_to: appartment attr_accessible :appartment_id On the appartment show method a partial is include with a lead-form. semantic_form_for @lead do |f| f.input :firstname f.input :lastname f.input :appartment, :as =

[Rails] formtastic / activeadmin

2011-10-05 Thread Remco Swoany
Newbie question: want to following code to migrate to formtastic: % f.fields_for :assets do |asset_fields| % % if asset_fields.object.new_record? % p %= asset_fields.file_field :asset % /p % end % % end % tried this: f.inputs Appartment Details do f.input :assets do |asset_fields|

[Rails] Paperclip nested resources problem

2011-08-22 Thread Remco Swoany
My models: class Country ActiveRecord::Base has_many :regions has_many :assets, :dependent = :destroy accepts_nested_attributes_for :assets end class Region ActiveRecord::Base belongs_to :country has_many :appartments has_many :assets, :dependent = :destroy

[Rails] dynamic image

2010-07-26 Thread Remco Swoany
Hi, I am developing a t-shirt shop. The feature i want to develop is a form where visitors can fill in there name and on the fly the name is printed on the t-shirt(image). Has someone what is the best practice to do this? Imagemagick, Javascript? Grt..remco -- Posted via

[Rails] Re: looking for a coutdown solution

2010-03-31 Thread Remco Swoany
Viola wrote: http://keith-wood.name/countdown.html I've used that before on my auction app. It workd pretty well. Viola I am a newbie...can you show me a code example how i can integrate this script with a db-record Thanks..advance! remco -- Posted via http://www.ruby-forum.com/. --

[Rails] looking for a coutdown solution

2010-03-30 Thread Remco Swoany
Hi, i am looking for a coutdown solution. When a product is created in my database a coutdown starts. The countdown is presented to visitors on my website. Someone ideas, links ? grtz..remco -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Store data in database from GA API

2010-02-18 Thread Remco Swoany
Hi, I use the gem gattica to acces our unique visitor data. This works fine in my console. require 'rubygems' require 'gattica' gs = Gattica.new({:email = '', :password = 'X'}) accounts = gs.accounts gs.profile_id = XX results = gs.get({ :start_date = '2010-02-17', :end_date =

[Rails] Store search paramters in database based on the current_user

2009-07-30 Thread Remco Swoany
Hi, This is my log-file output of the usercontroller. Processing UsersController#index (for 92.64.217.3 at 2009-07-30 08:57:46) [GET] Parameters: {commit=Search, date=, arrival=barcelona, departure=amsterdam} What is the correct way the store the params in de database based on the

[Rails] Re: Store search paramters in database based on the current_user

2009-07-30 Thread Remco Swoany
to change current_user.id to match the way you call your current user. I could have misinterpreted the question, of course. Please tell me. Kind regards, Jaap Haagmans w. http://www.relywebsolutions.nl On 30 jul, 09:03, Remco Swoany rails-mailing-l...@andreas-s.net Hi Jaap, Zie dat je

[Rails] Save userform data in database

2009-07-29 Thread Remco Swoany
Hi, I have a form like this. % form_for(@search) do |f| % %= f.error_messages % p %= f.label :country %br / %= f.text_field :country % /p p %= f.label :city %br / %= f.text_field :city % /p p %= f.submit 'Search' % /p % end % When a user is login i want to

[Rails] Parse form value in querystring/url

2009-07-29 Thread Remco Swoany
Hi, I want to parse the value of form in a query string/url. Somone ideas? remco -- 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

[Rails] Re: Save userform data in database

2009-07-29 Thread Remco Swoany
Hassan Schroeder wrote: On Wed, Jul 29, 2009 at 7:27 AM, Remco Swoanyrails-mailing-l...@andreas-s.net wrote: When a user is login i want to store the searches of the form. So the user view recent searches. Someone ideas/tips? saving data in a database is pretty basic Rails. :-)

[Rails] create 1000 items in DB

2009-07-18 Thread Remco Swoany
Hi, I want to create 1000 items at once(vouchers) in my db. My class name is Voucher. How can ik realize this...? remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Read email in ruby

2009-07-06 Thread Remco Swoany
Hi, We receive from our partner notification emails. My idea is to insert this email in our database. Ideas/links for reading emails in ruby? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Storing search value in database

2009-06-09 Thread Remco Swoany
Hi, We got a search form (with autocomplete) for airlinetickets. The idea is that we want to store the search query of all our visitors in our database. The objective is to add this info to our management info. Someone ideas? remco -- Posted via http://www.ruby-forum.com/.

[Rails] Counting

2009-05-13 Thread Remco Swoany
Hi, I generate and download a cvs from my (HBX)stats-tool. The data is campaign-history value for tracking the hisitory of campaigns Campaign-history Orders Direct 4 Direct~Direct 6 adwords2 adwords~direct~direct 4 organic12

[Rails] Multiply forms?

2009-04-16 Thread Remco Swoany
Hi, On my homepage i want a form with the element drop-down-box. When the visitor select one of the values from the drop-down-box and click on submit, the visitor go's to the details-page where the value from the drop-down-box is filled in and the visitor are suggested the complete the form. I

[Rails] Show text or image, based on data value

2009-04-02 Thread Remco Swoany
Hi, I have a table sales with the columns, title, short_description, long_description, start_date, end_date. The columns start_date end end_date has both a date value. My sales record are show on a index-page, with the start_date and end_date published. I want on the index-page a timer based

[Rails] Store find output in a new array

2009-02-26 Thread Remco Swoany
Hi, the array below is the output from a find(:all) [#Boekingen affnr: vl999, pnr: MA5OSG, agent: monties, ticket_prijs: #BigDecimal:b775f4c4,'0.138E3',4(12), aantal_pers: 2, ticket_fees: nil, res_kosten: nil, commissie: nil, ticket_verz: nil, tax: nil, total_prijs:

[Rails] Re: Store find output in a new array

2009-02-26 Thread Remco Swoany
Billy Hsu wrote: [code] ticket_fee = []find(:all).map{|record| ticket_fee record.ticket_fees} [/code] Try it:) btw, find(:all) you can write: 'all': Ticket.find(:all) #= Ticket.all On Thu, Feb 26, 2009 at 5:17 PM, Remco Swoany rails-mailing-l...@andreas-s.net wrote

[Rails] Re: Store find output in a new array

2009-02-26 Thread Remco Swoany
Remco Swoany wrote: Billy Hsu wrote: [code] ticket_fee = []find(:all).map{|record| ticket_fee record.ticket_fees} [/code] Try it:) btw, find(:all) you can write: 'all': Ticket.find(:all) #= Ticket.all On Thu, Feb 26, 2009 at 5:17 PM, Remco Swoany rails-mailing-l...@andreas

[Rails] Re: Count array keys possible?

2009-02-25 Thread Remco Swoany
PM, Remco Swoany Hi Maurício, Thanks for your reply. I have more bookings from the same departures, like this: departures = [ 'AMS', 'BCN', 'BKK', 'AMS', 'AMS', 'BKK'] Then i want to count the departures, like this based on the array above: AMS = '3' BCN = '1' BKK = '2' Is this possibly

[Rails] Re: Count array keys possible?

2009-02-25 Thread Remco Swoany
Maurício Linhares wrote: Why don't you do it at the database with an order by? - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Wed, Feb 25, 2009 at 1:04 PM, Remco Swoany hmm...i don't now how to count the values through

[Rails] Count array keys possible?

2009-02-24 Thread Remco Swoany
Hi, newbie question(i guess) a = Bookings.find(:all, :conditions = [3.days.ago]) a = [id : 1, departure : 'AMS', arrival = 'NY'],[id : 2, departure : 'AMS', arrival = 'BCN'],[id : 3, departure : 'AMS', arrival = 'BKK'],[id : 4, departure : 'AMS', arrival = 'BKK'] ect. The value of the key

[Rails] FusionCharts empty value

2009-02-23 Thread Remco Swoany
Hi I have this method. When i run it the @arr_data returns no value, so the graph remains empty. When i hard-code the value in the array, like this @arr_data ['test', '1234'] it works. What i am doing wrong?? def stacked headers[content-type]=text/html; @arr_data = [] #Get

[Rails] Scrape rankings Google

2009-02-02 Thread Remco Swoany
Hi, i use the code to scrape google search results. require 'rubygems' require 'scrubyt' google_data = Scrubyt::Extractor.define do fetch 'http://www.google.nl/' fill_textfield 'q', 'ticket' submit link_title //a...@class='l'], :write_text = true do link_url end end p

[Rails] NameError: uninitialized constant I18n

2009-01-22 Thread Remco Swoany
Just installed the plugin as described on the link below. http://factore.ca/on-the-floor/11-introducing-has-foreign-language-an-easy-database-internationalization-plugin If i fire up my console and then: I18n.default_locale = en i got the error message: NameError: uninitialized constant I18n

[Rails] Customize page(s) based on a referring search query..

2009-01-21 Thread Remco Swoany
Hi i want to customize a page based on a referring search query and i want to store the keyword(s) of the referring search query string in my app-database. Someone links for some direction how this works in RoR. remco -- Posted via http://www.ruby-forum.com/.

[Rails] Best way to distribute content to 20 sites

2009-01-14 Thread Remco Swoany
Hi, We have one database with some great content of cities(culture, events ect) I want to distribute this content over 20 sites in the context of the city. With primary objective of linkbuilding to our main-site. Question: Must i make 20 rails application with 1 master database? Question: Must

[Rails] Video on Rails?

2008-12-17 Thread Remco Swoany
Hi, Looking for a gem/plugins with the purpose of uploading/encode/decode video's to flash. Someone ideas? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Video on Rails?

2008-12-17 Thread Remco Swoany
Roderick van Domburg wrote: Remco Swoany wrote: Looking for a gem/plugins with the purpose of uploading/encode/decode video's to flash. Check out WhooTube at http://www.nedforce.com/products/whootube-flash-video-community-portal/. It's been a while since it's been updated, but you

[Rails] with_scope not working in 2.0

2008-12-17 Thread Remco Swoany
Hi, I just donwload some code. There are some upgrade issue in case off the with_scope method. This is the code in tje controller: Video.with_scope(:find = { :conditions = CONDITIONS }) How can i make this work in rails 2.0 without with_scope? grtz..remco -- Posted via

[Rails] Wich scraping tool ?

2008-12-02 Thread Remco Swoany
Hi, I want to develop a scraping tool. What is the best tool to use? scrubyt? hpricot? other? remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: could not find [gem] locally or in a repository

2008-11-17 Thread Remco Swoany
for cState_configure Installing RDoc documentation for json-1.1.3... No definition for cState_configure No definition for cState_configure Thanks, DeployD. On Nov 14, 9:14 pm, Remco Swoany [EMAIL PROTECTED] i just tried gem install json-1.1.3.gem but again..the error-message: ERROR

[Rails] Re: could not find [gem] locally or in a repository

2008-11-14 Thread Remco Swoany
Shrikant Lokhande wrote: Which Rubygem version your are install on system. Just do gem install --system and then try. let me know if there is any error. Thanks, Deployd. On Nov 14, 8:48 pm, Remco Swoany [EMAIL PROTECTED] I got this... gem install --system ERROR: While executing

[Rails] Re: could not find [gem] locally or in a repository

2008-11-14 Thread Remco Swoany
Shrikant Lokhande wrote: Use this and then try: gem update --system which specific gem you are trying to install ? Thanks, DeployD. On Nov 14, 8:54 pm, [EMAIL PROTECTED] I am trying to install json and tzinfo... -- Posted via http://www.ruby-forum.com/.

[Rails] Re: could not find [gem] locally or in a repository

2008-11-14 Thread Remco Swoany
Frederick Cheung wrote: On Nov 14, 3:48�pm, Remco Swoany [EMAIL PROTECTED] wrote: Hi, Every gem i tried to install i got the message: Error: Could not find �locally or in a repository! Perhaps your gem sources list is borked? gem sources will display it. Fred gem sources

[Rails] dynamic finder popularity

2008-11-11 Thread Remco Swoany
Hi, i have popularity table wich has a relationship with the bookings-destinations. Some destinations are booked more then others. The popularity table has the columns primary-key and a score. Example | TVC |6 | | AZO |4 | | TUO |

[Rails] Template question...

2008-11-10 Thread Remco Swoany
Hi, I have 4 controllers, a, b c, and d. In the controllers i created a method with the name homepage. What is the best solution (partials, content_for ect. ) the create the homepage-template with the content of the described controllers with the method homepage Grt..remco -- Posted via

[Rails] tips/links/books for building widgets

2008-11-05 Thread Remco Swoany
Hi, Has someone tips/links/books for building widgets in the RoR. Thanks..remco -- 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

[Rails] Muliply images wich plugin?

2008-11-05 Thread Remco Swoany
Hi, I have one destionation such as Barcelona and i want to store and show multiply pictures of Barcelona. Wich upload plugin is the best for this purpose? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Weird characters

2008-11-05 Thread Remco Swoany
Hi, I have weird characters in my view, like: Armeni� Jordani� Isra�l ect. How can i solve this problem? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Weird characters

2008-11-05 Thread Remco Swoany
TomRossi7 wrote: Do you have your charset set to utf-8 in the head of your html? Are the values coming from a database? --Tom On Nov 5, 3:46�pm, Remco Swoany [EMAIL PROTECTED] Tom, The values coming from my database (mysql). My header is: meta http-equiv=content-type content=text

[Rails] Content distrubution in Rails

2008-11-03 Thread Remco Swoany
Hi, I hope someone can suggest me some tips in case of content distrubution in Rails. We have some great content in our database. The content are city-guides of 20 destionations (sports, culture, beaches ect)world-wide. Now the idea is that we want to distribute our content to our

[Rails] Problems installing Gems

2008-10-23 Thread Remco Swoany
Hi, When i try to update or install the gems, nothing happens. It look like this i my console: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Killed Someone suggestions? Grtz..remco -- Posted via http://www.ruby-forum.com/.