similar to: partials and rjs

Displaying 20 results from an estimated 100 matches similar to: "partials and rjs"

2006 Jun 15
0
return from controller not evaluating script
I am using this in my controller to reload the country_area partial in my form def add_country_area render :update do |page| page[:country_area].reload end end << in form >> <span id="country_area"> <%= render :partial => ''country_area'' %> </span>&nbsp; << partial _country_area.rhtml >>
2006 Apr 26
3
drop downs
I''m having trouble getting a second drop down populated based on the value from the first drop down. I''ve tried following some of the examples posted, but haven''t had any success. I''m new to RoR so any help would be appreciated. When the first drop down''s value gets changed, it calls the correct method in the controller and even finds the correct
2006 May 17
3
RJS behave differently than render :partial?
I have a method in my controller like the following (the syntax may not be correct, I''m doing this from memory - you should be able to get the idea though) My rhtml page has a DIV with id="country_areas", which contains a partial that only makes a drop down of country areas for a specific country. When changing the country in the country drop down, it uses the
2006 May 20
3
in_place_editor and no access to value
I have the following in my rhtml and I get an error that ''value'' does not exist. This looks like the examples that I have seen so I am not sure what I am doing wrong. If I take off the :with part, I get a value parameter passed to my controller, but then I can''t figure out how to get the country id passed like I need to. <%= in_place_editor
2006 May 17
0
in place editor value of text box
When using the in place editor, it creates a form with a text field having the name "value". In my in place editor tag, I want to use the value of that text field as one of the parameters passed to my action. I''m trying to use form.value.value but that doesn''t work (it doesn''t recognize form.value.value) <%= in_place_editor
2006 Apr 08
2
Roaming profiles cannot be used fully unless a member of "Domain Admins"
Hello! This is my setup Using 3.0.14a-3sarge on Deb. This is my smb.conf file ---------------------------------------- # Global parameters [global] workgroup = MYWORKGROUP server string = Samba Server obey pam restrictions = Yes passwd program = /usr/bin/passwd %u passwd chat = *New*password* %n\n *Retype*new*password* %n\n
2006 Apr 06
0
3 doubts on observe_field
Dear friends, with the yours aid already I obtained to use observe_field, but still I am with some problems and necessary again. They are three questions to long of the source code below. Since already I am grateful for the tips. ==== _form.rhtml <!--[form:city]--> <p><label for="city_state_country_id">Pa?s</label><br/> <select
2010 Mar 26
7
seed data
Hi I am using seed_fu to seed initial data to tables (http://github.com/mbleigh/seed-fu) . And in db/fixtures/state.rb I have values like (I am filling only two data for simplicity) State.seed_many(:name, :abbr,:fips,:country_id, [ { :name => "Alberta", :abbr => ''AB'',:fips => ''01'', :country_id => 2 }, { :name =>
2007 Nov 07
5
Unexplainable failure...at least for me
I have an address model with country_id and province_id fields There is also a full_address method that returns an address that is in a format that the google maps api will be able to return a long-lat coords. Within the full_address method there is a call to obtain the province/state and country name. --------- def full_address ... full_address = [city, self.province.name,
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack 0.8.7, mysql 5.1.41) I has my_app/lib/migration_helpers.rb file: module MigrationHelpers def self.foreign_key(from_table, from_column, to_table) constraint_name = "fk_#{from_table}_#{to_table}" execute %{alter table #{from_table} add constraint #{constraint_name} foreign key (#{from_column})
2012 May 28
4
How to load a selection list into the method new of a controller?
Hi friends! I''m relatively new with Rails and I''m struggling for a long time with this problem (it should have a pattern solution but until now I didn''t find it): I have the following models: Institution, City, State and Country. class Country < ActiveRecord::Base has_many :states has_many :cities, :through => :states end # == Schema Information # Table
2006 Apr 11
1
how to do a simple update on the server from a change of a select box?
I have a list of items on a page. Each item has a select list. If someone changes the select list I would like to update the appropriate record on the server....nothing else. I suspect I am making this too difficult. I have an action on my controller for updating this value. I just tried the ''remote_function'', ah, function. It invokes the action on the controller but the the
2012 Nov 18
0
How mix jquery based ui packages and ruby on rails
I am trying to use jqx ui that is based on jquqery I have following questions 1. How do I generate the right id and name for the element without setting the element name and id in the format model name [attribute] ? Example <%= f.text_field :country_id %> generates sets the element id and name to bank[country_id] 2.how do i set the form element attributes like action ? Do i just use
2006 Jul 02
1
multitable form
Hi all, Although I''m experienced with programming I''m a beginner with ruby, RoR and MVC So I follow examples from books and so on and all is ok. I can make a model who is a class and who match to a table in my database and then I generate pretty forms on a webpage. I would like to know how I can do to make forms who interact with more than one table. For an example lets
2009 Jan 28
3
Apply style in collection_select ?????
Hi to all, i have this snip i want to apply style to this combo but there is no effect help....... <%= collection_select(:customer,:country_id, @countries,:id, :country, html_options={ "style" => "width:110px" },:onchange => ''updateState('''');'',:id =>''country_id'' )%> Thanks, -- Posted via
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all I tried and tried and tried, but I still fail in creating a form with proper validation and stuff for foreign keys... So I''d really like to get some help here. I''m creating a booking site for DJ''s, and for every booking one can choose one of different countries: class Booking < ActiveRecord::Base validates_presence_of :country_id
2006 Mar 18
10
collection_select''s linked
I created a form with two collection_select, country and state and would like to bring up to date the state list when to select a new country. How I can make this in Rails? Thanks Eleudson Brazil <p><label for="person_country_id">Country</label><br/> <%= collection_select(:person, :country_id, @countries, :id, :name) %></p> <p><label
2013 Jan 04
1
plm random effect: the estimated variance of the individual effect is negative
Matteo, I fully agree with David: please read the posting guide. Anyway, the error message says it all: "the estimated variance of the individual effect is negative". See e.g. the "basic panel" chapter (10 or 11) in Wooldridge's "Econometric Analysis of XS and Panel Data" to understand why this may happen. Stata's behaviour is (as far as I remember) to
2006 Aug 17
1
More on n-way.
Hey, i found some n-way threads on the list, but I think they don`t solve my case, or I didn`t understand how all of it works. I''m new to Rails, so be pacient. :) I''ll use an example of movie catalog, I''m realing doing a kind of movie catalog, for laerning rails, and I did this: Models: Movie, Actor, Director, Writer, Country, Language The Movie model HABTM Actor,
2006 Jan 19
1
Populating a select field using observe_field
Hi, I''ve just started toying with Rails and AJAX, so forgive me if this is a bit of a stupid question. I''m trying to populate a select field when the value of another select field is changed. Looking through the API doc, it seems like observe_field is what I need. In my view I have: <p><label for="wine_country_id">Country</label><br/>