lib/pickle/path.rb in ianwhite-pickle-0.1.12 vs lib/pickle/path.rb in ianwhite-pickle-0.1.13
- old
+ new
@@ -11,10 +11,10 @@
# pass it as 'extra' and this method will run through the possibilities
#
# path_to_pickle 'the user', :extra => 'new comment' # => /users/3/comments/new
def path_to_pickle(*pickle_names)
options = pickle_names.extract_options!
- models = pickle_names.map{|m| model(m)}
+ models = pickle_names.map{|m| model!(m)}
if options[:extra]
parts = options[:extra].underscore.gsub(' ','_').split("_")
find_pickle_path_using_action_segment_combinations(models, parts)
else
pickle_path_for_models_action_segment(models, options[:action], options[:segment])
\ No newline at end of file