kangkyu / session-do

Keep in touch with your ongoing tasks
https://ongoin.gs/
3 stars 1 forks source link

edit tab_bar partial #11

Closed kangkyu closed 9 years ago

kangkyu commented 9 years ago

edit tab_bar - and try refactor and use template helper

kangkyu commented 9 years ago

clean the :page symbols on tab_bar partial.

task_form:
  tasks/edit.html = "/tasks/:id/edit"
  tasks/new.html = "/tasks/new"
user_edit:
  users/edit.html = "/users/:id/edit"
task_show:
  tasks/show.html = "/tasks/:id"
task_index:
  tasks/index.html = "/" || "/tasks"
session_new:
  sessions/new.html = "/session/new" || "/login"
user_new:
  users/new.html = "/register" || "/users/new"

welcome_guide_path  GET /welcome/guide(.:format)  welcome#guide
kangkyu commented 9 years ago
if controller_name == 'sessions' && action_name == 'new'

which one's better?

if current_page? "/login"

In case the latter, it would better to add except: :new

resource :session, except: :new
kangkyu commented 9 years ago

http://guides.rubyonrails.org/action_controller_overview.html#routing-parameters

The params hash will always contain the :controller and :action keys, but you should use the methods controller_name and action_name instead to access these values.

Go this way

kangkyu commented 9 years ago

In my opinion we don't need a partial or don't need to grid columns for tab_bar, maybe in the next time