| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
And remove snapshots (we don't need it anymore)
|
|
- Implement new API
- Migrate the LineDecorator
- ensure no change on the "lines/index" view
|
|
- Add `activate` and `deactivate` actions in `LinesController`, as well
as corresponding routes
- Add `activate!` and `deactivate!` methods in `Chouette::Line`, as well
as `activated?`
- Add `activate?` and `deactivate?` permissions in `LinePolicy`
- Add corresponding `action_links`in the Decorator
- Create helper for these actions
- Add an optional `'extra_class` to the Links
- Update styles for ".delete-action" to handle the case where there are
several
- Add I18n keys accordingly
|
|
|
|
The tests failed because we weren't using a decorated `Chouette::Line`
object, but the views now expect decorated lines in order to be able to
call the `#action_links` method.
Here are our failures:
5) /lines/show should render h1 with the line name
Failure/Error: - @line.action_links.each do |link|
ActionView::Template::Error:
undefined method `action_links' for #<Chouette::Line:0x007fc8cdf0bb88>
# ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360'
# ./app/helpers/newapplication_helper.rb:246:in `block (2 levels) in pageheader'
# ./app/helpers/newapplication_helper.rb:244:in `block in pageheader'
# ./app/helpers/newapplication_helper.rb:243:in `pageheader'
# ./app/views/lines/show.html.slim:2:in `_app_views_lines_show_html_slim___3813514632397395671_70250211127360'
# ./spec/views/lines/show.html.erb_spec.rb:16:in `block (2 levels) in <top (required)>'
# -e:1:in `<main>'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `action_links' for #<Chouette::Line:0x007fc8cdf0bb88>
# ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360'
6) /lines/show should render a link to remove the line
Failure/Error: - @line.action_links.each do |link|
ActionView::Template::Error:
undefined method `action_links' for #<Chouette::Line:0x007fc8cfdaa710>
# ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360'
# ./app/helpers/newapplication_helper.rb:246:in `block (2 levels) in pageheader'
# ./app/helpers/newapplication_helper.rb:244:in `block in pageheader'
# ./app/helpers/newapplication_helper.rb:243:in `pageheader'
# ./app/views/lines/show.html.slim:2:in `_app_views_lines_show_html_slim___3813514632397395671_70250211127360'
# ./spec/views/lines/show.html.erb_spec.rb:31:in `block (2 levels) in <top (required)>'
# -e:1:in `<main>'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `action_links' for #<Chouette::Line:0x007fc8cfdaa710>
# ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360'
Update the test to decorate the lines used in them.
Turn `current_organisation` into a `context` field on `LineDecorator`
because otherwise it's a global variable that comes from wherever that's
required in `LineDecorator`. And we'd have to mock
`current_organisation` on `line` in the test, which I wasn't keen on.
Refs #3479
|
|
|
|
|
|
referential; in progress
|
|
|
|
|
|
lines in Referential. Refs #826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|