similar to: Selecting an option from another window

Displaying 20 results from an estimated 10000 matches similar to: "Selecting an option from another window"

2009 Jul 20
2
render :file in another window
is there a way to render a file in another window I wrote : def show @asset = Asset.find(params[:id]) respond_to do |format| format.html format.xml { render :xml => @asset } format.pdf {render :file => @asset.data.path } end end this render in the current window.... thanks for your suggestions erwin
2006 Apr 24
2
Checkboxes - Saving a Checked record to another table
I am displaying a bunch of records from a table called "assets". Next to each record i have a checkbox. When this box is checked i want to be able to save the id of the record into another table called "flagged_assets". All I need is the ID, nothing else. Im struggling with the logic to save to another table. I know how to do it if the asset_id is already in the
2008 Jul 22
5
RJS opener.reload()
Hello, I have a problem with RJS. I have a popup and by pressing a button within it I want to: 1. close this popup, which functions fine with onClick in the view and 2. reload the opener page of the popup after the called action in the controller is done. I tried: render :update do |page| page.opener.location.reload() end in the controller, but this didn''t work. Can anyone
2008 Jun 01
1
Page loading popup
Ran into a strange problem with my app. Had branched off our development tree and made some significant modeling changes and some view changes here developing locally not through facebook. When I try to test the code through facebook now I''m getting a Facebook popup dialog on anypage I try to hit of our app that just says Loading. The JS error console shows Error: this.obj.parentNode
2006 Apr 18
6
Help with Forms
Hello, Ive been trying to sort out this problem for a couple of days now. Here''s my problem: Im builing an ajax form that has a repetitive sequence of similar form elements (tracking_id). <%= text_field "asset", "tracking_id", "index" => i, "class" => "case" %> <%= text_field "asset", "tracking_id",
2004 Oct 03
1
How might one write this better?
I am trying to simulate the trajectory of the pension assets of one person. In C-like syntax, it looks like this: daily.wage.growth = 1.001 # deterministic contribution.rate = 0.08 # deterministic 8% Wage = 10 # initial Asset = 0 # initial for (10,000 days) { Asset += contribution.rate * Wage
2005 Dec 02
3
Conceptual Design Question
Hi All, I am making a DAM (seems to be the hip thing to do these days). It is for the company that I work for. We have some really weird domain rules that have prevented me from just using a simple directory structure file permission system. I have come up with a solution but I wanted to run it by you gurus to ensure that I am not recompiling the wheel here. Basically the domain rule is: A user
2006 Apr 24
4
Joined search returns NIL ids
I have two models: assets and makes. Make has many assets and an asset belongs to one make. I am calling this part of my asset controller from a search form with the parameters "search" (search term) and "field" (database field heading) which then renders a partial with the search results on it. ######################################################## if
2012 Mar 20
4
Multiple Paperclip Images on Index
Hi, I am working on a project that is using Paperclip to upload multiple images to an Asset model. my Post model has_many Assets. As per this tutorial/screencast... https://github.com/Emerson/Multiple-File-Uploads-with-Paperclip-and-Rails-3/blob/master/app/views/posts/show.html.erb"> http://www.emersonlackey.com/article/paperclip-with-rails-3> This all works fine and I can
2006 Mar 11
2
Customising FCKeditor
I would like to customise my FCKeditor-instance so that when the "add image" button is pressed, it opens my own add_image popup. In this popup i would handle the image upload/image browser/etc. tasks with rails. How can I open the popup and pass the picture information from there back to FCKeditor''s textarea? -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
6
NewbieQ: How do I refresh view after return from popup window
Hi, I have this bitta code that is supposed to open a new window and allow the user to create a new Organisation on the fly whilst editing a new Person i.e. if the Organisation exists they can select it from the drop down select. Otherwise they can click on the cute button and enter a skeleton Organisation record. What I need to do next is refresh the drop down select on returno the new
2012 Aug 04
6
Automatic asset paths prevent logical asset organization
In 2fe70c1 (last year), rails changed from a static list of assets.paths to automatically register any path under assets/*. (This was not reflected in Rails Guides so I pushed an update to docrails.) However, in my opinion, these automatic asset paths create confusion. The result is that the first-level directories under `(app|lib|vendor)/assets` get swallowed and if I put assets into a
2007 Jun 26
4
Can I stub a method on a belongs_to association:
describe Asset, " when destroyed" do fixtures :assets, :videos, :sites, :publish_settings before(:each) do @asset = assets(:test_asset) @mock_hook = mock("hook") @asset.video.stub!(:hook).and_return @mock_hook # error occurs here end it "should call the delete hook" do @mock_hook.should_receive(:update).with("test_video",
2012 Dec 18
2
cache-busting non-digest assets in sprockets in development a good idea? should headers in sprockets be configurable?
Just monkey patched Sprockets in our Rails 3.2.9 app to override the Cache-Control header for html assets that we need to tweak more often in development, but that we don''t want to use digests/fingerprinting with: # Sprockets 2.x patch if Rails.env.development? module Sprockets module Server private alias_method :sprockets_headers, :headers def headers(env,
2007 May 28
2
Rails, respond_to? over anonymous module (extend has_many).
Hello List, I''m trying to generate examples for some list-helpers I have coded which use in my projects. Basically, the Playlist class uses one anonymous module in has_many that acts as helper between acts_as_list and my desired API: class Playlist < ActiveRecord::Base # associations go here has_many :playlist_items, :order => :position, :dependent => :destroy has_many
2006 Feb 27
0
Example code for select_from_db (a.k.a. combo box)
I''m not asking for help this time! :) :) In almost every Rails project I create, I find that I want a select() popup menu that is pre-populated by data from the database. Also, I want an "Other..." option that presents a text_field_tag to input another (not presented) option (basically a combo-box). In an attempt to be as DRY as possible, I''ve come up with
2007 Jul 23
2
ActiveRecord.find :group option
I have a very simple find call... @assets = Asset.find(:all, :group => ''asset_type_id'', :order => "name") I have 3 Asset objects in my database, all of which have asset_type_id equal to 1. Why does this query only return 1 object? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because
2007 Dec 20
3
ActiveRecords Eager Loading
Hi, I am doing an eager loading in ruby on rails using below statement ------------------------ Article.find(:all, :include => [:asset, :vote], :conditions=>"assets.parent_id is null", :order=>"stat_final_ranking desc", :limit=>20) --------------------------------------- the above statement resulted in this expensive query.
2007 Jul 19
2
Transform URLs from: "url.com/Bob+Doe" to "url.com/bob_doe"
Is that possible, and would you know how I can do that? I''m creating individual pages for users based on their first and last names. In my routes.rb, I have: map.client '':user_full_name'', :controller => ''user'', :action => ''individual_user_page'' Then in my controller, I have: def individual_user_page @user =
2012 Feb 15
2
Control number of assets in resulting portfolio with optimizations using package fPortfolio
Dear All, I am using package fPortfolio to run minimum variance portfolio optimizations in R. I already know how to set portfolioSpecs, portfolio objects and constraints. Unfortunately I am not able to set the following type of constraints. I have a timeSeries object with returns data for roughly 1.5k assets for 261 subperiods (workingdays) and want to compute the global minimum variance