[Rails] Re: List of radio buttons

2010-05-23 Thread Smok


On 21 Maj, 17:28, Hassan Schroeder  wrote:
> On Fri, May 21, 2010 at 8:25 AM, Marnen Laibow-Koser
>
>  wrote:
> > No, first learn about HTML form syntax (hint: the "name" attribute is
> > significant here)
>
> Heh. Beat me by a minute :-)
>
> I was going to suggest that the OP has apparently never read this
>  and that it'd be
> an excellent place to start...
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.

Thanks guys for your responses. For the future - it would be great if
you could to give some kind of hint or high level description how to
approach soloving the problem. Such as reading about FORM, some links
would be great. Thanks !

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: List of radio buttons

2010-05-21 Thread Smok
On 21 Maj, 00:19, Hassan Schroeder  wrote:
> On Thu, May 20, 2010 at 2:46 PM, Smok  wrote:
> > I need to create in RoR 2.3.5 alistof questions ( the number of
> > questions will be changing). The answers will be near to each of the
> > these questions in radiobuttons (let's say 3 radios near each of
> > thequestions). After having compleated all of these questions I would
> > like to read all the answers and using ONE update insert them to the
> > database(mySQL). Is it possible to create this functionality without
> > js?
>
> Of course. You're describing a basic form. Why would you think you
> need JavaScript to submit it and process the data?
>
> Or am I misunderstanding your goal?
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan
>
Thanks Hassan for your answer. However I don't know how to define the
radiobuttons (in such a way that a different answer can be checked for
different questions). And I don't know how to read all the user's
answers. Could you try to paste a bit of code?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] List of radio buttons

2010-05-20 Thread Smok
I need to create in RoR 2.3.5 a list of questions ( the number of
questions will be changing). The answers will be near to each of the
these questions in radiobuttons (let's say 3 radios near each of
thequestions). After having compleated all of these questions I would
like to read all the answers and using ONE update insert them to the
database(mySQL). Is it possible to create this functionality without
js?

Kind regards,
Smok

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Showing slides using periodically_call_remote in rails 2.3.5

2010-05-08 Thread Smok
Hello,

I have a problem with showing slides in a row. I would like to have a
slideshow which would show all pictures. I am learning RUby so this
example is from  book 'Ruby on Rails". I am using Rails 2.3.5. Below
the code that I use. The error that I am getting since Monday is:
ActionController::UnknownAction (No action responded to show_slide.
Actions: create, destroy, edit, index, new, show, and update)
I have included
  <%= javascript_include_tag :defaults %>
in app/views/layouts/application.html.erb

Could you help me? I have no idea why it doesn't work.

---app/views/slideshows/
show.html.erb --- begin
<%= @slideshow.name %>
<% if @slide %>
 
   <%=  render :partial => "show_slide" %>
 

 <%= periodically_call_remote :update=> 'slides',
  :url   => { :action
=> :show_slide },
  :frequency => 1 %>
<% end %>
<%= link_to 'Edit', edit_slideshow_path(@slideshow) %> |
<%= link_to 'Back', slideshows_path %>
---app/views/slideshows/
show.html.erb --- end

---app/views/slideshows/
_show_slide.html.erb --- begin
<%= image_tag "photos/#...@slide.photo.filename}" %>
<%= @slide.photo.filename %>
---app/views/slideshows/
_show_slide.html.erb --- end

---app/controllers/
slideshows_controller.rb --- begin
.
.
def show_slide
   @slideshow = session[:slideshow]
   session[:slide_index] += 1
   @slide = @slideshow.slides[session[:slide_index]]
   if @slide == nil
  session[:slide_index] = 0
  @slide = @slideshow.slides[0]
   end
   render :partial => "show_slide"
 end
---app/controllers/
slideshows_controller.rb --- end



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.