Forum: Ruby on Rails Using Rails and the Flickr API

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dan C. (Guest)
on 2006-04-07 03:12
Hi all,

Week 2 of my Rails experience and I'm loving life!

This is one of my first times consuming a web service, but the Rails
demo made the process very exciting... I followed along with the video
and have my own little Flickr search up and running!  Woo hoo!

So now I want to do a bunch of other things to it and I'm struggling...
excuse my ignorance, but is there some extensive Ruby/Rails/Flickr
document somewhere?  I'd like to get some clues about how all the
different pieces fit together: -

flickr_controller.rb -

class FlickrController < ApplicationController
  def search
    flickr = 'API_KEY'
    render :partial => "photo", :collection => => params[:tags], :per_page => '24')

views/flickr/index.rhtml -

<%= form_remote_tag :url => {:action => 'search'}, :update => 'photos',
      :complete => visual_effect(:blind_down, 'photos'),
      :before   => %('spinner')),
      :success  => %(Element.hide('spinner')) %>

  <%= image_tag '/images/spinner.gif', :id => 'spinner', :style =>
'display: none' %>

	<label for="tags">Tags:</label>
	<%= text_field_tag 'tags' %>
	<%= submit_tag 'Find' %>

  <div id="photos" style="display: none"></div>
<%= end_form_tag %>

views/flickr/_photo.rhtml -

<a href="<%= photo.sizes[0]['source'] %>"><img class="photo" src="<%=
photo.sizes[0]['source'] %>" /></a>
This topic is locked and can not be replied to.