lib/padrino-gen/generators/components/actions.rb in padrino-gen-0.9.6 vs lib/padrino-gen/generators/components/actions.rb in padrino-gen-0.9.7
- old
+ new
@@ -68,15 +68,15 @@
end
# For the removal of migration files
# removes the migration file based on the migration name
def remove_migration(name)
- migration_path = Dir[destination_root('db/migrate/*.rb')].find do |f|
+ migration_path = Dir[destination_root('db/migrate/*.rb')].find do |f|
File.basename(f) =~ /#{name.to_s.underscore}/
end
return unless migration_path
- if behavior == :revoke
+ if behavior == :revoke
create_file migration_path # we use create to reverse the operation of a revoke
end
end
# For testing components
@@ -112,9 +112,9 @@
action_declarations = field_tuples.collect do |request, name|
"#{request} :#{name} do\n end\n"
end
action_declarations.join("\n ")
end
- end
- end
- end
-end
+ end # Actions
+ end # Components
+ end # Generators
+end # Padrino
\ No newline at end of file