Created
August 13, 2013 19:42
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL goes like this: | |
http://localhost:3000/admin/photos?utf8=%E2%9C%93&tag=6 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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