Skip to content

Instantly share code, notes, and snippets.

@rafaelcgo
Created August 13, 2013 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelcgo/6224897 to your computer and use it in GitHub Desktop.
Save rafaelcgo/6224897 to your computer and use it in GitHub Desktop.
The URL goes like this: http://localhost:3000/admin/photos?utf8=%E2%9C%93&tag=6
URL goes like this:
http://localhost:3000/admin/photos?utf8=%E2%9C%93&tag=6
module PhotosHelper
def search_tag_form(options = nil)
text = text_field_tag :tag, params[:tag]
submit = submit_tag "Search Tag", name: nil, class: "btn"
form_tag tag_admin_photos_url, :class => "form-search", method: :get do
concat content_tag(:div, text << submit)
end
end
end
Platafotto::Application.routes.draw do
devise_for :admins
devise_for :users
namespace :admin do
resources :admins
resources :events
resources :photos do
get '(tags/:tag)', to: 'photos#index', as: :tag, on: :collection
end
resources :places
resources :users
end
resources :events
resources :photos do
get '(tags/:tag)', to: 'photos#index', as: :tag, on: :collection
end
resources :places
root 'static#home'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment