dont worry just got my fix
this worked
= fav.label :state_name if !fav.object.id.nil?
--
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 and stop receiving emails f
hello folks
Im trying to populate a text_field with a simple_fields_for and it
works as expected for the collection of data but at the end i always end
up with a empty text_field where i could input data, how do not display
the empty text_field. Here is a stub of what im trying to do in haml
=
Colin Law wrote in post #1074344:
> On 2 September 2012 19:23, brent brent wrote:
>> external call and is not expensive. so where is the best place to do
>> things that happen from external calls and do not directly relate to the
>> mvc? any advice would be helpfull thanks.
Folks
Quick question, i know db model logic goes into the model and how the
views are interacted with goes into the controller code. And how the
page looks goes into the view code with rails. But lets say i have a
system call that shells out and runs a command that populates an array
with a list
Folks
Im using simple_form and im able to see a selection of users from my
drop
down list but im trying to set the default value. Here is what ive tried
<%= f.association :people, :input_html => { :value => 'someval' } %>
i want someval to be set in the selection by default. Any help would be
app
Folks
Can a model just have a belongs_to only? or do you have to have a
belongs_to and a has_many or has_one on the other model?
--
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
Folks
When im in rails 3.2 console i can do this just fine
p = Person.last
p.last_name
and it prints the last name.
But when i try to find it by the id, its able to locate the single
record and store it in my variable p, but i cant print the last_name
column. For example.
p = Pers
Folks
Does anyone know how i could call destroy on a controller using rails
3.1 from a jquery function. Im just trying to find some examples online
and cant seem to find anything that shows this. Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are sub
Michael Pavling wrote in post #1045589:
> On 11 February 2012 16:31, brent brent wrote:
>> Folks
>> Was wondering is it possible to pass args into the new action on a
>> controller? I have some javascript that is passing in a date to action
>> new on a controller and i
Folks
Was wondering is it possible to pass args into the new action on a
controller? I have some javascript that is passing in a date to action
new on a controller and i want to set a field if the date was passed in.
--
Posted via http://www.ruby-forum.com/.
--
You received this message becau
hello
anyone know how i can set a default integer value with simple_form, i
have code like this below in my view but its not working.
<%= f.input :age, :value => '30' %>
i would like the input box to have the value of 30 by default
thanks for any help.
--
Posted via http://www.ruby-forum.com/.
Hi folks
Im trying to pass a value to my hidden div using simple_form but im
not sure how to do this, was wondering if anyone could help me with
this. Here is my view using simple_form
<%= f.label "First name" %>
<%= f.text_field :first_name %>
<%= f.label "Last name" %>
<%= f.text_fie
brent brent wrote in post #1033872:
> Folks im new to rails and was wondering how i would access these
> elements from my view
>
>
> in my controller i have
> @data = Editpatient.find(:all, :conditions => ["patient_id = ?",
> params[:patients]] )
>
> and
Folks im new to rails and was wondering how i would access these
elements from my view
in my controller i have
@data = Editpatient.find(:all, :conditions => ["patient_id = ?",
params[:patients]] )
and in the view i have <%= @data %>
this displays all the data but i only want one field. This is
14 matches
Mail list logo