similar to: exposing id''d

Displaying 20 results from an estimated 6000 matches similar to: "exposing id''d"

2006 Jan 04
7
variables in layouts
I have a layout that provides the basic outline of each page in my app. It has a title, footer and a navigation bar. In the title I want to put the name of the current user that is logged in. I could do something like @session[:username] but I would rather encapsulate that into a single variable so that I can change the key in the session map if I want without having to goto each page that
2006 Mar 16
9
Baffling AJAX issue
Ok, I''ve got some link_to_remote stuff working elsewhere just fine, but this time it''s doing something very screwy. Here''s the view code to create a link to remotely toggle a boolean value on a record: <td class="contact_active"> <%= link_to_remote "<div id=''contact_active_#{cm.id}''><span
2006 Mar 03
5
Quick question about @params
I was looking through the loginGenerator code and noticed the following: Login: User.authenticate(@params[:user_login], @params[:user_password]) Signup User.authenticate(@user.login, @params[:user][:password]) The syntax of the call in the signup code confused me...what exactly does @params[:user][:password] this return to me? Is the params structure a multi-dimensional array? I would have
2006 Mar 03
3
Switchtower not updating code...
When I deploy using switchtower the code does not update at all. It does however copy the old release into its timestamped directory under /releases/, but nothing in /currect/... is updated. Any help at all would be much appreciated! -- Posted via http://www.ruby-forum.com/.
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2005 Dec 29
2
has_many & belongs_to with Plugins (login_engine)
Hello list, Probably a newbie question but couldn''t find the answer in the archives. I am using the login_engine Plugin to implement the login functionality. I have a JournalEntry model that interacts with the journal_entries table. I would like to link the journal entries to the user who entered it. Essentially, it is a one to many relationship between the model User(from
2006 Apr 12
1
Back In Time
On a system that I am working on, there are 2 places where you can edit answers to questions. After editing, I need to redirect back to the place where the user came from. A common problem I am sure, but I couldn''t find any info on how other people had handled it. I came up with a method called ''redirect_back_in_time'' that redirects you to a point in history. I
2006 Mar 16
1
application_helper.rb vs application.rb
I find that I want to put the same methods into both of these files. Whats the best way to get away with a single implemenation? Gareth -- Posted via http://www.ruby-forum.com/.
2007 Aug 22
2
Sanitize my params and the create method
If I call .create on the param structure, are the parameters being passed to the create method automatically sanitized for me? e.g. Journalentry.create(param[:journalentry]) Do I have to worry about any malicious scripting making its way into the creation of the record? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2006 Apr 04
4
Help with many-to-many using :through
I am using many-to-many using :through since I need to store additional information in the join table. I am doing this and it seems to work. I want to verify that this is the best way to do this. Tables foods - id, food foodallergies - food_id, symptom_id, a few other columns symptoms - id, symptom Models class Food < ActiveRecord::Base has_many :foodallergies has_many :symptoms,
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone, I have a function test the is failing (despite the fact the function actually works in the application). I was looking for some debug advice on how to find my problem. Here is the test: def test_should_delete_word assert_equal ''published'', words(:one).status debugger delete :destroy, :id => words(:one).to_param assert_equal
2013 Apr 12
1
What is the meaning of the method to_param?
Hey! Foe example i have next code: test "should update user" do put :update, id: @user.to_param, user: @input_attributes assert_redirected_to users_path end What return id: @user.to_param? -- 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 unsubscribe from this group
2006 May 28
9
Railsmanual.org
Did anyone else catch the redesign? I don''t know who''s responsible, but it''s lookin better! Good job... -- seth at subimage interactive http://www.subimage.com/sublog/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060528/f9f92618/attachment.html
2007 Jan 24
2
A spec where interaction-based testing breaks down... (at least for now)
Here are the specs: context "Finding all the stylesheets available to a company" do setup do @mock_company = mock("company") @mock_company.stub!(:to_param).and_return "1" Stylesheet.stub!(:find) end def do_find Stylesheet.find_available_to @mock_company end specify "should convert the company into a parameter" do
2007 Jan 30
5
errors while testing resource controller using rpec
I am testing a resource called venue in this piece of code (generated using script/rspec_resource) ==================== context "Requesting /venues using POST" do controller_name :venues setup do @mock_venue = mock(''Venue'') @mock_venue.stub!(:save).and_return(true) @mock_venue.stub!(:to_param).and_return(1) Venue.stub!(:new).and_return(@mock_venue)
2007 Sep 20
2
Superimposing vector polygons over raster grid in a plot
Hello: I would like to superimpose vector polygons (state outlines) from a Shape file on top of a satellite image, imported into a SpatialGridDataFrame from GEOTIFF via gdal_translate and readGDAL. When I plot polygon and point shape files in R, into SpatialPointDataFrame and SpatialPolygonDataFrame, the two feature sets line up geographically, so it seems logical that a SpatialGridDataFrame
2007 Sep 18
2
rSpec / Nested Routes / Mocks
I''m having a terrible time trying to test a nested route with rSpec. I can''t seem to tell rSpec to expect the call @item.user. The following error message plagues me not matter how I try to fuss with the mock: Spec::Mocks::MockExpectationError in ''ItemsController handling POST / items should redirect to the new course on successful save'' Mock
2010 Apr 29
1
Starting call recording using a dynamic feature to call a macro
I have got call recording working on our 1.4.30 asterisk box together with a recording pause ability and being able to play different audio to each party at the start and end of the pause. This all works perfectly but one wish is to have the audio files have a beep or something in them so when you listen later you can tell where the audio was paused. So I changed things around so that instead
2005 Jan 04
6
OT: List of VoIP providers?
I have been looking around for VoIP providers but have not found a good listing. Is there no "yellow pages" for VoIP providers? Google mostly returns services like Vonage, Packet8, NuFone, ect. None seam to be very reseller friendly and none offer LNP or local DID's for my area. Anyone know of a list (even a partial one) Jeromie Reeves
2010 Jan 04
2
to_parm and how it can be used in a helper
is there a way to pass the data returned by the to_parm function in a helper? i followed the info provided at http://www.jroller.com/obie/entry/seo_optimization_of_urls_in and am able to successfully get the correct urls, now i want to be able to get the same (id-whatever) text and pass it to a helper function for further processing. Any ideas as to how this can be achieved? -- Posted via