Maybe you can look at these screencasts and learn how to dynamically add
form elements using javascript and then adapt it for your case as needed.
http://railscasts.com/episodes/196-nested-model-form-part-1
http://railscasts.com/episodes/197-nested-model-form-part-2
http://railscasts.com/episodes/
On Mar 2, 2013, at 11:20 AM, NN Dodhia wrote:
> Hi i'm fairly new to ruby on rails and i'm creating a form using simple_form
> and in one bit i have radio buttons and say i have 3 buttons a,b,c so i want
> it to be if a is pressed then certain text fields show, and if b is pressed a
> differen
On 2 March 2013 17:23, Dave Castellano wrote:
> Thank you everyone for the previous validation help. I have one last
> question... Can anyone tell me if there is a standard way to deal with a
> failed
> validation and loss of the data that was partially completed on the
> form. I currently use a
On 2 March 2013 16:20, NN Dodhia wrote:
> Hi i'm fairly new to ruby on rails and i'm creating a form using simple_form
> and in one bit i have radio buttons and say i have 3 buttons a,b,c so i want
> it to be if a is pressed then certain text fields show, and if b is pressed
> a different set of t
Dave, consider this refactor
create an instance method in your question model
def standard?
question_type == "standard"
end
then your view/controller syntax get a bit more readable
@question.standard?
On Sat, Mar 2, 2013 at 12:56 PM, Dave Castellano wrote:
> When I "render :new", the view
Never mind... got it!
@question_type == "standard"
--
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 from it, send an email
to rubyonrail
When I "render :new", the view gets called correctly but there is a
partial in the new.html.erb view which does not render.
<%= form_for @question, :as=> :question, :url => { :action => "create"}
do |f| %>
<% if @question_type == "standard" %>
<%= render 'new_and_edit_fields', f: f %>
Jodi S. wrote in post #1099859:
> further this url will help with any other questions
>
> http://guides.rubyonrails.org/layouts_and_rendering.html
Thank you.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
further this url will help with any other questions
http://guides.rubyonrails.org/layouts_and_rendering.html
On Sat, Mar 2, 2013 at 12:40 PM, Jodi Showers wrote:
> render the view - @question will be given to the view for rendering the
> previous values
>
> render :new if @question.errors.any?
render the view - @question will be given to the view for rendering the
previous values
render :new if @question.errors.any?
On Sat, Mar 2, 2013 at 12:23 PM, Dave Castellano wrote:
> Thank you everyone for the previous validation help. I have one last
> question... Can anyone tell me if there
Hi i'm fairly new to ruby on rails and i'm creating a form using
simple_form and in one bit i have radio buttons and say i have 3 buttons
a,b,c so i want it to be if a is pressed then certain text fields show, and
if b is pressed a different set of text fields show and similarly for c.
Can anyo
Thank you everyone for the previous validation help. I have one last
question... Can anyone tell me if there is a standard way to deal with a
failed
validation and loss of the data that was partially completed on the
form. I currently use a redirect back to the same action and lose all
the data (o
On 2 March 2013 10:27, Shawn Francis wrote:
> I am a new learner of Ruby on Rails.
> I followed through the railstutorial.org tutorial and I'm trying to
> learn off the sample demo app where you can to make microposts and only
> the people who are "following" you can see them.
> If I wanted to mak
Hi Ralph Shnelvar
I followed your steps for using jw_player_helper. I got the jw player on
my view but somehow it does not play any video. I have put up the video
under public/videos .When click on play, it shows no-access or file not
found at videos/3.mp4 . What I could be missing?
I am workin
I am a new learner of Ruby on Rails.
I followed through the railstutorial.org tutorial and I'm trying to
learn off the sample demo app where you can to make microposts and only
the people who are "following" you can see them.
If I wanted to make it so every user can see microposts as an additional
On Friday, March 1, 2013 10:02:05 PM UTC, Leo Dirac wrote:
> The Ruby on Rails Security Guide http://guides.rubyonrails.org/security.html
> has a fairly embarrassing anachronism in it. In section 2.2 on Session ids
> it reads
>
>
> To date MD5 is uncompromised, but there have been collisions,
The Ruby on Rails Security Guide
http://guides.rubyonrails.org/security.html has a
fairly embarrassing anachronism in it. In section 2.2 on Session ids it
reads
To date MD5 is uncompromised, but there have been collisions, so it is
> theoretically possible to create another input text with t
17 matches
Mail list logo